Re: [xml] xmlDocDumpMemory() is VERY slow on Win32



Steve Hay wrote:

Igor Zlatkovic wrote:
 

I don't know. I'm stuck on Linux at the moment, can't boot Windows until
tomorrow. Glancing at the libxml code, one thing I can say for sure. The
bottleneck is either in xmlCharEncOutFunc in encoding.c, or farther down 
the road in the UTF8toisolat and UTF8toUTF8.

If you use VC6, you can compile a profile-enabled libxml and see where it
spends most of its time. Somehow I have a bad feeling that this is a problem
in Windows memory manager and won't be fixed easily.

   

I am using VC6, but I don't have any profiling software available.  I'll 
try sticking some printf() calls in around the functions that you 
mentioned and see if I can find the bottleneck.

Well, putting a printf() call at the start of xmlCharEncOutFunc() shows 
that it gets called hundreds of times over (all evenly spread) when 
there is an encoding declaration in the XML file, but not even once when 
there isn't.  (I tried both with and without iconv support enabled in 
the libxml2 build.)

It seems that out->encoder is NULL in xmlOutputBufferWrite() [xmlIO.c] 
when there is no encoding declaration.

Is that what was expected?

- Steve



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for 
the addressee(s) only.  If you have received this message in error or there are any problems, please notify 
the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly 
forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not 
necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and 
any attached files for viruses: Radan Computational will accept no liability for any damage caused by any 
virus transmitted by this email.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]