-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch to incremental compilation #11218
Comments
This issue is too vague. Is it about the startup time of the julia prompt, or the performance of loading packages (#4373), or repeatedly |
it's about doing "julia mycode.jl". Mycode.jl is one module (rather large, hundreds to thousands of lines) which uses around 5 libraries via "using". I'm not sure where most of the compilation time is spent: in compiling mycode.jl or in compiling the libraries it uses but when you change only one line or a few lines you're in for several seconds of compilation time. That's too slow for RAD. I'm not sure if it's even technically possible but ideally incremental compilation could be done at a submodule level like function or type scope. If that's not possible than only recompile changed files (since a module can be comprised of multiple files and hence file scope <= module scope). In the end I'l like to get to the same compilation time of something like java + eclipse where when you hit save (ctrl +s) and the recompilation is almost instantenously. |
Once packages have been loaded and compiled, they don't need recompilation. So it's all in your module. Juno provides some support for updating functions in previously-defined modules. |
@timholy But he appears to be restarting julia at every run, in which case all non-Base modules are recompiled. |
Oh, I see---thanks @nalimilan. @ssagaert, you'll be much happier if you use the REPL for your development. You can just I'm going to close this as not being immediately actionable, and better covered through open pull requests and issues. |
Yes, in the case of running |
I'm just a Julia user and not a dev, so this is easy for me to say (pardon my audacity): In other interpreted environments (Python, LuaJIT, Node), it's quite a common task to launch a script from a bash shell, or launch processes from another language in some kind of batch-job scheduler. Telling the user to use the REPL for development is a suitable workaround, but I don't feel like that is a good solution in the long term. It reminds me of JVM start time with Java programs, and these overheads are noticeable. One could launch a JVM/Julia interpreter process and pipe in inputs via STDIN, but this is a lot harder than calling Are there ongoing efforts, or at least plans, for static compilation of modules? I can't seem to find the relevant issues in the tracker. I may or may not have the relevant expertise but maybe I can give it a shot if I know more about the designs for such a mechanism. |
Long story short, you can check out the master branch now and type |
Only compile changed code instead of all code of a file when running that file. This will greatly improve startup time.
Even when AOT compilation becomes available this will also be useful for that scenario.
The text was updated successfully, but these errors were encountered: