[xmlp] the recent garbage collector performance improvements
webby at beardmouse.org.uk
Thu Feb 2 17:08:15 PST 2012
On 02/02/2012 17:11, Jesse Phillips wrote:
> for me disabling the GC during load doesn't change load time,
> but I'm not using the document loader.
The GC hit is related to the number of dom nodes that exist at one i
think -> the visitor approach doesnt allocate the whole dom tree, so
there are far fewer items (and less allocated memory for the gc to scan).
For comparison, parsing my test file using XmlVisitor takes less than 3
seconds (over twice as fast as the DOM version).
I looked in to it a bit and found this:
Seems that it's calling GC.qmalloc 350000+ times, mostly for 16byte
blocks, when normalizing attributes. This doesn't seem hugely clever :-(
More information about the Digitalmars-d