Re: [xml] some questions



On Thu, Apr 22, 2004 at 02:19:25PM +0200, aliban gmx net wrote:
  If you read what's happening on this list, when I suggest someone does
a patch and that persone does it, I apply said patch unless there is a
serious issue. 

yes, would not be a patch but only another api.

  yes, a new api, and as patch generated with diff -p or diff -c !

So yes, sure, I suggest you try to work around the problem,
and provide an implementation for said API, just please make sure it's
per context and not relying on a global variable.

befor i try this i have another important question that is quite 
principal about using sax interfaces.
i did not do a stress test with my lib yet.
whatever while i think about it... if i add data with xmlParseChunk 
will the already parsed buffer be freed when an element got parsed? a 
xmpp stream might end after gigabyte of transfer volume and therefor 
it could be a problem if all data that was received is stored in the 
parser context until the xmpp document/stream ends (one day).
So far i always thought that the parsed buffer will be freed as soon 
as the events (like ElementEnd and those) are fired and the mem usage 
is minimal and only temporary. but the current (fixed) behaviour of 
xmlParseChunk() will have to store the whole buffer in memory as long 
as the doc was not finished, right?

  come'on ... of course it does not store the stream !!!
Read the code, really, and if you can't make sense of it you should
be very careful before submitting a patch.
data passed to xmlParseChunk() are user data, the parser will make a copy,
and may retain part or the complete fragments until it is not needed.
This area *is* complex. It will take time to understand, but once you
understand it you will see why the parser behaves the way it does.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team 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]