|
From: libwbxml <ti...@op...> - 2012-05-10 07:39:50
|
#80: Very slow when parsing XML node with lots of short lines of text.
--------------------------+----------------------
Reporter: conrad.irwin | Owner: somebody
Type: issue | Status: new
Priority: important | Milestone:
Component: wbxml2 | Version: 0.11.0
Severity: other | Keywords:
--------------------------+----------------------
This is caused by the continual pre-pending of the entire text parsed so
far to the next line of input in wbxml_tree_add_node for adjacent text
nodes.
The example I came across was about 6MB of Base-64 encoded data arranged
into lines 76 bytes long, so it was copying the entire input around 100k
times which took a couple of minutes.
I've attached a patch that fixes this, and also changes the behaviour of
buffer reallocation to double in size each time the end of the buffer is
reached to reduce the potential number of copies that may need to be made
due to reallocation.
--
Ticket URL: <https://libwbxml.opensync.org/ticket/80>
libwbxml <http://libwbxml.opensync.org/>
WBXML Library
|