-
Notifications
You must be signed in to change notification settings - Fork 250
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
loading Gadfly takes a long time #251
Comments
That's pretty normal, unfortunately. The issue is simply that It's frustrating, but I don't think it's a permanent situation. A lot of work has already been done on pre-compling Julia code, and when that's extended to packages, things should be much better. Until then, there's not much I can do about it besides removing features from Gadfly, which I'm not inclined to do. I think relevant Julia issue you may want to watch is JuliaLang/julia#4373. |
You can already precompile packages. Just create a
in it. Then build julia. You should find that saying For packages that require some kind of initialization (most commonly, those that make use of C libraries), sometimes it's more involved, and for a couple of them I've never succeeded. You can see some examples of initialization functions in Gtk, HDF5, and Images. I've found, however, that I'm generally unlikely to precompile packages that I work on myself a great deal, because it means any change forces you to rebuild Julia. I'm still feeling my way forward on how to choose which packages to precompile and which packages to just pay the price of load time. |
Do you know whether Julia will at some point support automatic compilation as in Python? |
Making this stuff more convenient is definitely desirable and will happen. |
@vks, since I've hardly used Python, I'm not sure I can answer your question, but I presume what you mean is "independent files precompiled for each package." I can't say when that will happen.
Agreed. But do keep in mind that the procedure I outlined allows you to avoid precisely this problem, with very little effort (in the cases where it works). One extra tip: there are actually two steps, parsing/lowering (which is mostly what happens when you load a file) and JIT-compiling. The |
@timholy: In Python, whenever you load a module, the corresponding source file (.py) gets compiled to bytecode and cached in the same directory (.pyc). The nice thing is that the user does not need to care about it, it just happens. I'm not sure how Julia works internally, but it would be great if it could save time doing something similar. |
That would be nice. It will happen when someone makes it happen. (We're all volunteers here.) |
"I've found, however, that I'm generally unlikely to precompile packages (Thanks for the precompiling tip! That's nice to know about.) On Thu, Mar 27, 2014 at 3:31 AM, Tim Holy [email protected] wrote:
David J. Chudzicki Data Scientist |
Good question, I'm not sure I tested, but I bet it would. Usual rules apply, of course---you'd have to scope everything with the module name for the new code to be used. |
FWIW, @tanmaykm does include Gadfly in the sys.ji on JuliaBox. |
Yes, Gadfly and its related packages are precompiled on JuliaBox and that makes it load almost instantaneously. Also, |
If you add |
Just loading it takes about 30 s on my machine. Is this normal? Why does it take so much time?
The text was updated successfully, but these errors were encountered: