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: http://www.dsource.org/projects/xmlp/ticket/10

Seems that it's calling GC.qmalloc 350000+ times, mostly for 16byte blocks, when normalizing attributes. This doesn't seem hugely clever :-(

Reply via email to