Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/raw.jl
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,12 @@ function next_no_xml_space(o::Raw) # same as v0.3.5
data = o.data
type = o.type
has_xml_space = o.has_xml_space
ctx = [false]
# `ctx` (the xml:space inheritance stack) is unused by this code path —
# `next_no_xml_space` is only called when the document has no `xml:space`
# attribute anywhere, so the per-node ctx is always `Bool[false]` and is
# never mutated. Reuse the parent's `ctx` instead of allocating a fresh
# one; on a 47 MiB file this drops ~60 MiB of cumulative allocation.
ctx = o.ctx
i = findnext(!xml_isspace, data, i)
if isnothing(i)
return nothing
Expand Down
Loading