From: Harry Ohlsen Date: 2004-02-07T07:46:33+09:00 Subject: Re: Is there any way to mark an object as "always in use" (specifically, in a C extension)? Ralf Horstmann wrote: >Have you already tried xmlparser (wrapper around >expat)? > Back when I originally wrote it, I didn't have control of the box and hence couldn't get expat installed easily, so I didn't look any further at the time. However, I might give it a go by installing it in my own account. I also didn't have a lot of time to get this up and running back then. Since I already had some C code that did what I wanted (and nothing more), I figured it would be faster to wrap it ... plus, in the back of my mind, I'm sure I was thinking "what a great opportunity to learn how to do C extensions" :-). Nobu's suggestion worked fine, although I've not benchmarked yet to see whether the change has made a significant difference ... this thing takes quite a while to run, so it's hard to tell unless you think to look at the clock, or print some timestamps out, which is what I'll do when I get back to work on Monday. >It's quite fast. I use it for huge XML documents where >rexml and nqxml are way too slow. > > Just out of interest, how large was your "huge". Some of my documents are (literally) hundreds of megabytes. The other point I should make is that this application has to be able to make fairly arbitrary changes to the DOM, like moving whole subtrees around, and the changes are user-defined, hence I can't even use some kind of smart housekeeping, so event driven won't work for me. Cheers, Harry O.