Re: [xml] Need better XML writing performance
- From: Daniel Veillard <veillard redhat com>
- To: Richard Salz <rsalz us ibm com>
- Cc: "'xml gnome org'" <xml gnome org>, xml-bounces gnome org, "Noble, Robert" <Robert Noble PHLX com>
- Subject: Re: [xml] Need better XML writing performance
- Date: Thu, 13 Jul 2006 02:37:00 -0400
On Wed, Jul 12, 2006 at 09:50:52PM -0400, Richard Salz wrote:
We need to increase performance of our XML data generating application.
Our
app receives (during peak periods) as many as 5,000 binary messages per
second and converts them to XML using libxml2 and writes them to a file
in
real time. Our environment is Sun Solaris 10.
Why not just use printf (or println or whatever) directly?
it's a tradeoff between speed and correctness. I must admit I never
used the writer API myself, and never tried to profile this code, so
there may be some easy to catch performance problems (for example make
sure the buffer are grown by doubling the size each time and not
realloc'ing each time, we already saw some very surprizing performances
problems due to allocation on windows in the past). Without further
indication it's hard for me to make any serious guess on what may actually
happen in that case.
Concerning multithreading, yes libxml2 should work fine as long as 2
different threads don't access to the same document concurrently, and that
the multithread support of libxml2 was compiled in.
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]