I have a somewhat odd “my package is slow to load” problem that I cannot find another example of, because the most serious slowdown occurs after the package loads:
julia> using Dates julia> now() 2020-01-18T19:22:19.392 julia> @time using MyPkg @time print("HI") now() 33.425458 seconds (35.61 M allocations: 1.904 GiB, 2.54% gc time) julia> @time print("HI") HI 0.000068 seconds (10 allocations: 464 bytes) julia> now() 2020-01-18T19:33:11.904
I typed the commands as quickly as possible, one after the other. You can see that I only have ~33.5 seconds accounted for of the 11 minutes that my commands took to execute. The
@time print("HI") was the line the interpreter appeared to be processing during the unaccounted-for time. It doesn’t actually matter what that line is and sometimes I don’t get to finish typing it before the interpreter lags. No other windows are affected. Also, this doesn’t happen after loading other packages, only
MyPkg that I’m making.
If run a script containing the same commands, it takes ~35 seconds.
Here are my toaster’s details:
Julia Version 1.3.1 Commit 2d5741174c (2019-12-30 21:36 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) Ubuntu 18.04.3 LTS uname: Linux 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 CPU: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz: speed user nice sys idle irq #1 2904 MHz 3142631 s 3458 s 74752 s 5914124 s 0 s #2 2904 MHz 2673208 s 2577 s 70172 s 6380178 s 0 s Memory: 7.7875518798828125 GB (1355.8671875 MB free) Uptime: 92171.0 sec Load Avg: 1.00146484375 1.1064453125 1.28125 WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, skylake) Environment: JULIA_NUM_THREADS = 2 JULIA_CMDSTAN_HOME = /home/dev/cmdstan-2.21.0 HOME = /home/dev WINDOWPATH = 2 TERM = xterm-256color PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin JULIA_CMDSTAN_HOME = /home/dev/cmdstan-2.21.0
I do not use OMyRepl and Revise was not loaded for this example (just Julia accessed from terminal). Also, the package was already compiled and does nothing with InteractiveUtils. A single CPU goes to 100% during the mystery time, so it is doing something and I’m just not sure what.
What could cause that ~9.5 minute interpreter lag?