-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
I’ve encountered a severe performance regression in version v0.3.6 when using LazyNode.
Example code:
using XML
using CodecZlib
stream = GzipDecompressorStream(open("berlin-v5.5.3-1pct.output_plans.xml.gz"))
pos = read(stream, LazyNode)
function next_tag(pos, search)
pos = next(pos)
while tag(pos) != search
pos = next(pos)
if pos === nothing
return nothing
end
end
pos
end
next_tag(pos, "person")
@time next_tag(pos, "person")
The test file can be downloaded from:
https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/berlin-v5.5-1pct/output-berlin-v5.5-1pct/berlin-v5.5.3-1pct.output_plans.xml.gz
Results:
- v0.3.5: next_tag executes in ~4 µs
- v0.3.6: The same call takes ~8 seconds — around 2 million times slower.
This issue occurs both with compressed (gzip) and uncompressed streams.
Metadata
Metadata
Assignees
Labels
No labels