Groups 120 of 99+ julia-users › Possible bug: very slow module load after addprocs 7 posts by 2 authors Marius Millea Jul 19 I noticed that once I addprocs , subsequent using statements were extremely slow. I guess in this case its loading the module on each processor, but if it happens in parallel it shouldn't be that much more wall time, and here I'm talking about two orders of magnitude difference. Assuming I've got a file Empty-jl who contents is, module Empty end then single threaded: tic using Empty toc elapsed time: 0.024461076 seconds vs. multi-threaded: addprocs I've got 8 procs tic using Empty toc elapsed time: 2.479418079 seconds Should I submit this as an Issue on Github, or is there something else going on? I've checked both Julia 0.4.5. and 0.5 01e3c8a . I'm on Ubuntu 16.04 64bit. Cedric St-Jean Jul 19 Maybe there is some warm-up JIT time in there? If you create an Empty2 module and load it after Empty, is it also slow? Marius Millea Jul 19 Seems it may have something to do with that. If I understood correctly what you're saying, if I create Empty2-jl defining module Empty2, I get, julia addprocs ; julia tic ; using Empty; toc elapsed time: 2.706353202 seconds 2.706353202 julia tic ; using Empty; toc elapsed time: 0.00042397 seconds 0.00042397 julia tic ; using Empty2; toc elapsed time: 0.029200919 seconds 0.029200919 julia tic ; using Empty2; toc elapsed time: 0.000193097 seconds 0.000193097 That first load of Empty2 at 0.02 secs is much more in line with what loading it on a single processor takes. Cedric St-Jean Jul 19 Re: julia-users Re: Possible bug: very slow module load after addprocs Yes, that's what I meant. Presumably the multi-proc machinery is getting compiled at the first `using`. It's the same reason why println 2+2 is very slow on first use, but fast afterwards. Marius Millea Jul 20 Re: julia-users Re: Possible bug: very slow module load after addprocs I don't think that theory totally works, it seems to scale to some extent with the length of time to load the package itself. Another example: julia tic ; using PyPlot; toc elapsed time: 3.395904233 seconds vs julia addprocs ; julia tic ; using PyPlot; toc elapsed time: 13.877550518 seconds or even: julia addprocs ; julia using Empty; tic ; using PyPlot; toc elapsed time: 7.357315778 seconds In any case, it can get pretty painful loading a few modules at the beginning of my parallelized scripts... Cedric St-Jean Jul 20 Re: julia-users Re: Possible bug: very slow module load after addprocs That does look suspicious. Maybe file an issue if there isn't one? Marius Millea Jul 20 Re: julia-users Re: Possible bug: very slow module load after addprocs Done, see https: github.com JuliaLang julia issues 17509