As discussed in https://github.com/pszufe/OpenStreetMapX.jl/pull/44#discussion_r667459615 and https://github.com/JuliaIO/ProtoBuf.jl/issues/179, creating the small dictionaries can be a bottleneck when reading many small structs.
I assume that for DenseNodes, it it's ok since it's one bit struct but for reading all the small Ways and Relations, it can be quite noticeable.
As the timings depends on the % of the GC time, I give a few different runs (I know, I should use BenchmarkTools ^^)
As discussed in https://github.com/pszufe/OpenStreetMapX.jl/pull/44#discussion_r667459615 and https://github.com/JuliaIO/ProtoBuf.jl/issues/179, creating the small dictionaries can be a bottleneck when reading many small structs. I assume that for
DenseNodes
, it it's ok since it's one bitstruct
but for reading all the smallWay
s andRelation
s, it can be quite noticeable. As the timings depends on the % of the GC time, I give a few different runs (I know, I should use BenchmarkTools ^^)Currently:
After https://github.com/JuliaIO/ProtoBuf.jl/pull/184:
After this PR:
After both PR: