[xml] Function xmlOutputBufferWriteEscape seems to slow down on big xml
- From: Alexandre Macard <amacard arkeia com>
- To: xml gnome org
- Subject: [xml] Function xmlOutputBufferWriteEscape seems to slow down on big xml
- Date: Wed, 09 Jul 2008 16:57:44 +0200
Hi everyone.
I developped a webservice with libcsoap api. This one use libxml2, of
course.
I use libxml2 version 2.6.32 on Linux Gentoo.
We are doing some tests on this webservice and we have a very long time
to get a response with a big XML.
(nearly 7mo xml).
We tried gprof to find why it takes more than 20secs ! and we found that
all the 20secs are spent
in libxml2, function xmlNodeDump().
So I tried to define which function inside xmlNodeDump is in charge. And
I found, if I patched libxml2 to use exclusively
function xmlOutputBufferWriteString() instead of
xmlOutputBufferWriteEscape(), the return takes only 1sec !
The source I patched to get this result is in xmlsave.c file in function
xmlNodeDumpOutputInternal(). This function parse everything in the node.
All nodes types are XML_TEXT_NODE and are encoded into base64. So, I
don't need to escape
characters in these strings.
The function xmlOutputBufferWriteEscape() is always called because the
node name (cur->name in source code) is always equal to the global const
xmlStringText.
I tried to build my xml with a node name equal to xmlStringTextNoenc
instead of xmlStringText but nothing changed.
Is there a known issue with xmlOutputBufferWriteEscape() function ?
Is there a solution to get node->name equal to xmlStringTextNoenc
instead of xmlStringText, and how ?
Thanks in advance for your help.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]