-
Notifications
You must be signed in to change notification settings - Fork 61
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
Since 0.5.17 OhMyREPL is not that snappy (without sysimage compilation) #312
Comments
S it seems the issue is that JuliaSyntax has a lot higher latency than Tokenize on 1.8: 1.8:
1.9:
@timholy, @c42f, I guess none of you have any direct ideas for being able to bring that down on 1.8. I am surprised how |
I can reproduce the 1.8 vs 1.9 differences. Is there a difference between executing a precompile workload like we do in JuliaSyntax, vs the list of precompile statements in Tokenize src/_precompile.jl ? (Presuming equivalent coverage from both) |
I did try to add an explicit precompile statement to JuliaSyntax as well but I didn't get it to "stick". If I executed that precompile statement in the REPL after loading JuliaSyntax, the first call was fast but not when only put into the package. |
Only if there are runtime dispatches. When you execute What happens next depends on "ownership": if the dispatched callee belongs to the package, no worries, it will also get cached. If it doesn't, then by default it won't. Explicit
Sounds like codegen, since Presumably JuliaSyntax is "bigger"? Or is that not really true? |
isn't that just because 1.9 added the ability to cache foreign package? Now that we switched to JuliaSyntax, in 1.8, we can't cache JuliaSyntax stuff at all |
It's definitely bigger - it includes all the Tokenize.jl code (heavily modified at this point), as well as the parser. And But that in itself might not be the problem; I find it curious that
I wondered if there was a problem with this somehow. Is there an easy way to get visibility onto this part? |
|
Tokenize runs with O1 https://github.com/JuliaLang/Tokenize.jl/blob/8d2aa01f8f814de060ff8f80f164cb8909c899c7/src/Tokenize.jl#L4 but I doubt that would cause such a big change. |
This has been solved in JuliaSyntax 0.3.5 (thanks to Kristoffer's PRs). Unfortunately, #316 is still relevant, due to invalidations in REPL.jl and Tar.jl. Kristoffer has already fixed more of these in Tar.jl (JuliaIO/Tar.jl#152 ,:heart: btw), but these will not land until Julia 1.10 as Tar.jl is a stdlib. |
I pressed
]
in both scenarios immediately:With 0.5.20 (master):
https://user-images.githubusercontent.com/19436526/226926409-63afeeb3-828c-4810-b256-07cf37d76917.mp4
With 0.5.17 .
https://user-images.githubusercontent.com/19436526/226926422-a9f7c70e-3201-4ddf-b935-30352011a1de.mp4
The newer version takes considerably longer to enter the packager manager. I'm aware of a little lag but now it increased to a big lag.
With Julia 1.9 it seems to be snappy with 0.5.19 too.
The text was updated successfully, but these errors were encountered: