You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 for Blink.Window().
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 all JSON.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:
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 JSON.parse calls in Blink.jl, so I'll focus on that for a while and might make some type stability PRs here instead.
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: