[xml] Incremental output (kinda followup to: streaming output)

Date view Thread view Subject view Author view

From: Lutz Behnke (behnke@trustcenter.de)
Date: Fri Feb 18 2000 - 10:56:14 EST


Hi there,

I want to use libxml in an application that sends data over a http connection.

David, I have read your answer to Havocs question, stating that you would not
use such large trees, but rather either do it all in one streaming go, or split
the messages.

My problem is a little bit different: while each individual document is small
enough to write to memory w/o using all VM, there are some issues:
  a) I have to watch the memory footprint of each message and its environment as
     this is a server application and I need to be able to process more than one
     message in parrallel.
  b) As I have to write the outgoing data to the network, I costs a lot of overhead
     to write data to a file first and then pump the file back into the socket.
     And as this is somewhat security sensitive I also have to watch temp files
     in general (lets say that I was brainwashed to simply dislike temp files).
  c) If I dump the tree to memory I allmost double the mem footprint instantly.
     I would really like to avoid this.
  d) generating the tree for outgoing messages from the tree of incomming messages
     makes some sense as there are rather complex operations on both before I write
     all of it back to the net.

I would assume that there are some kind of iterators to go over the tree in order
to dump it to mem or to a file. would it not be possible to adapt them to a producer-
consumer style dumper that stop when a number of bytes are written?
I would like to write it, but unfortunately am I only stalking around the lib trying
to understand how to use it, let alone how to extend it.

mfg lutz

-- 
Lutz Behnke, TC TrustCenter GmbH
Sonninstrasse 24-28, D-20097 Hamburg, Germany
Tel:040/80 80 26-0  Fax:040/80 80 26-1 26   http://www.trustcenter.de
-----BEGIN GEEK CODE BLOCK-----
 Version: 3.1  
GCS/IT d- s+:+ a C++ ULS+++$ P+++ L+++ E+++ W++ !N o? k? !w@++ !O
!M !V PS+ PE Y+ PGP t+ 5+ X R+ tv+ b+++ DI+++ D G++ e++ h* r y+  
------END GEEK CODE BLOCK------

----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:04 EDT