Revise.jl is laggy on Julia v1.10.2 and Revise v3.5.14
I've noticed two issues with Revise recently.
- After precompiling a large package, the REPL freezes for 10 seconds or more. As in, I press "1" and it takes 10 seconds to print.
- Behavior during an interactive session is odd. It will run some code instantly, for instance a print statement, but once it interacts with code that I have altered, it hangs for 5 or so seconds before continuing.
Bot these lags are very frustrating. I am curious if other users have reported them, but I don't have the time at the moment to dig into the exact cause.
I have this issue too, don't have a idea about why
I haven't checked, but it's almost surely https://github.com/timholy/CodeTracking.jl/pull/95#issuecomment-1149863382 (see #680)
If anyone wants to tackle this, #807 is probably the way to go.
Oh, this actually seems like a different (and far worse) form of lag. I haven't seen this myself. If you have a reproducer, this seems serious and worth a look. But without a reproducer there's very little I can do.
This seems to only happen with DataFrames for me.
So any project that uses DataFrames should make the REPL unuseable for 15 seconds or so after precompilation.
I can understand how it might happen after loading. I don't understand any way it could depend on precompilation happening. Precompilation happens in a separate process, so it shouldn't affect your REPL session.
I did this:
tim@diva:~$ julia -q
julia> Base.VERSION
v"1.10.4"
julia> Revise # is Revise loaded?
Revise
(@v1.10) pkg> activate --temp
Activating new project at `/tmp/jl_46iHPm`
(jl_46iHPm) pkg> add DataFrames
Resolving package versions...
Updating `/tmp/jl_46iHPm/Project.toml`
[a93c6f00] + DataFrames v1.6.1
Updating `/tmp/jl_46iHPm/Manifest.toml`
[34da2185] + Compat v4.15.0
[a8cc5b0e] + Crayons v4.1.1
[9a962f9c] + DataAPI v1.16.0
[a93c6f00] + DataFrames v1.6.1
[864edb3b] + DataStructures v0.18.20
[e2d170a0] + DataValueInterfaces v1.0.0
[842dd82b] + InlineStrings v1.4.2
[41ab1584] + InvertedIndices v1.3.0
[82899510] + IteratorInterfaceExtensions v1.0.0
[b964fa9f] + LaTeXStrings v1.3.1
[e1d29d7a] + Missings v1.2.0
[bac558e1] + OrderedCollections v1.6.3
[2dfb63ee] + PooledArrays v1.4.3
[aea7be01] + PrecompileTools v1.2.1
[21216c6a] + Preferences v1.4.3
[08abe8d2] + PrettyTables v2.3.2
[189a3867] + Reexport v1.2.2
[91c51154] + SentinelArrays v1.4.5
[a2af1166] + SortingAlgorithms v1.2.1
[892a3eda] + StringManipulation v0.3.4
[3783bdb8] + TableTraits v1.0.1
[bd369af6] + Tables v1.12.0
[56f22d72] + Artifacts
[2a0f44e3] + Base64
[ade2ca70] + Dates
[9fa8497b] + Future
[b77e0a4c] + InteractiveUtils
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[d6f4376e] + Markdown
[de0858da] + Printf
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA v0.7.0
[9e88b42a] + Serialization
[6462fe0b] + Sockets
[2f01184e] + SparseArrays v1.10.0
[10745b16] + Statistics v1.10.0
[fa267f1f] + TOML v1.0.3
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
[e66e0078] + CompilerSupportLibraries_jll v1.1.1+0
[4536629a] + OpenBLAS_jll v0.3.23+4
[bea87d4a] + SuiteSparse_jll v7.2.1+1
[8e850b90] + libblastrampoline_jll v5.8.0+1
julia> using DataFrames
julia> 1+1
2
No lag, not even when DataFrames was precompiled.
Does this exact sequence lag for you? If it does, then please provide details about your OS and system. If not, then you're going to need to be much more explicit about what is needed to reproduce this lag.
Yes, sorry for not being explicit.
I will get back to you with a better MWE. Just tried on my macbook and didn't reproduce. But I'm normally on Linux. Will let you know.