-
Notifications
You must be signed in to change notification settings - Fork 64
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
Use JSON3 #479
Comments
Unfortunately I think this would be a breaking change since WebIO users can overload the JSON functions to customize their output when serialized. It might be possible to do it in a backwards compatible way (eg fall back to slow JSON), but if not it'd have to be a major version. |
Yes, it would mean moving everything to JSON3 and defining serialization with StructTypes.jl. But probably everyone should be doing that anyway, it will solve a lot of problems, and the serialization is more generic. It seems worth it to me - but I'll see how much of that red can be removed first and post another flame graph. |
Also turns out most of this is from |
Type instability in
JSON.Parser.parse
is responsible for a massive amount of time-to-first X for most JuliaGizmos packages. It is responsible for about 10 seconds or half of the load time forBlink.Window()
.Swapping
AssetRegistry
over to JSON3 more than halved the load time ofInteract.slider
JuliaGizmos/AssetRegistry.jl#15
It should do something similar here. This probably also means swapping over JSExpr.jl, Knockout.jl and pretty much everything else in JuliaGizmos to use JSON3. I've done most of this, but its a bit of work to finish, so flagging to make sure it can be merged if I do finish it.
This is a flame-graph for
@profview Blink.Window()
. The large red areas are allJSON.Parser.parse
, and likely some of the towers of type inference are too. The whole thing is about 20 seconds.The text was updated successfully, but these errors were encountered: