You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caching of modules that have been compiled. The cached version should be used if the beam file has not been modified since the module was compiled. When the beam file is modified, that cache should be invalidated.
When a beam file's modified date does not match, do a full compile
What I'm not sure of is how to handle cases when the module itself hasn't changed and some other module uses a function on that module that was previously unused and not compiled. I am am guessing in order to handle that, the cache may need to keep track of functions compiled. Then at least if one if the above happens, it can force a cache invalidation
cache storage location could be set with a mix param? right beside input, output, etc?
a default location in the priv directory seems right, perhaps under elixir_script/ folder which is already required.
There isn't a need for the caching to be configurable or in the priv folder. The best places are probably the _build folder somewhere or a temp directory
I thought you might want to use the same cache with multiple elixirscript projects, the performance benefits of this is probably negligible.
if by default temp dir is outside _build, such as in ~/.config or something, it gets really annoying to pass through the project as a volume to containers and such.
It could be related to how the state is stored. It's possible that step will be slowest because it does the loading of modules for most of modules being compiled
Activity
bryanjos commentedon Aug 12, 2017
I think steps to make this happen include:
What I'm not sure of is how to handle cases when the module itself hasn't changed and some other module uses a function on that module that was previously unused and not compiled. I am am guessing in order to handle that, the cache may need to keep track of functions compiled. Then at least if one if the above happens, it can force a cache invalidation
bryanjos commentedon Aug 12, 2017
I am also not sure currently how the cache should be stored
vans163 commentedon Aug 13, 2017
cache storage location could be set with a mix param? right beside input, output, etc?
a default location in the priv directory seems right, perhaps under elixir_script/ folder which is already required.
bryanjos commentedon Aug 13, 2017
There isn't a need for the caching to be configurable or in the priv folder. The best places are probably the
_buildfolder somewhere or a temp directoryvans163 commentedon Aug 13, 2017
I thought you might want to use the same cache with multiple elixirscript projects, the performance benefits of this is probably negligible.
if by default temp dir is outside _build, such as in ~/.config or something, it gets really annoying to pass through the project as a volume to containers and such.
vans163 commentedon Sep 6, 2017
Current compilation step times in milliseconds. This is not counting the time spent inside elixir compiler so add an extra 1-2 seconds.
Why is output step taking so long? half the time is the cost of modules = ElixirScript.State.list_modules(pid)
bryanjos commentedon Sep 6, 2017
It could be related to how the state is stored. It's possible that step will be slowest because it does the loading of modules for most of modules being compiled
bryanjos commentedon Nov 7, 2017
Closing this in favor of #438 which is a bit more directed