[gambit-list] Speed on XML-parsing

Christian Jaeger christian at pflanze.mine.nu
Sat Aug 16 11:39:32 EDT 2008


Christian Jaeger wrote:
> I guess you could still achieve that goal if you take the mutex when 
> starting to read from a stream, then release it when the last piece of 
> the document has been read. Where exactly you would introduce those 
> lock/unlock calls into the work flow, I don't know as I haven't really 
> worked with SSAX-SXML yet.

Forgot to say:

- I don't really know the details of the Gambit I/O: it might not be ok 
to take a port mutex on a port for a long time (they weren't meant for 
userspace locking after all, this is internals hacking). (Marc may tell, 
or find out by try&error.)

- also, if userspace (i.e. the modified SSAX-SXML, or, worse, it's user) 
does make an error and does not do correct locking, it could get the 
port metadata into inconsistent state which may lead to exceptions or 
(since most of Gambit's internals are compiled in unsafe mode) into 
crashes. So this is a bit walking on the razors edge.

Christian.




More information about the Gambit-list mailing list