quinnj / JSON3.jl

Other
214 stars 47 forks source link

`@inline`-statements in src/structs.jl seem to bloat the precompiled size and slow TTFX #279

Closed jaakkor2 closed 17 hours ago

jaakkor2 commented 5 months ago

Ref: https://github.com/JuliaLang/julia/issues/53570#issuecomment-2095034076 Precompiled GLTF size on Julia v1.11.0-beta1 is a whopping 211 MB. Removing @inline statements from src/structs.jl the precompiled size drops to 13 MB

On Julia v1.10.3, precompiled size is 43 MB

using GLTF
@time load(joinpath(pkgdir(GLTF), "assets", "DamagedHelmet.gltf"));

gives

5.356109 seconds (3.35 M allocations: 166.812 MiB, 0.80% gc time, 99.99% compilation time)

and without @inline in src/structs.jl the precompiled size is 10 MB and

 0.384157 seconds (677.40 k allocations: 49.200 MiB, 8.62% gc time, 99.85% compilation time)

On 1.11.0-beta1, TTFX seems to be fast in both cases.