Hi, You can view the creation of the DOM Tree as a sort of SAX parse that creates the objects that are required. If you are not doing any heavy duty work in the methods you have overriden I would expect it to be significantly faster.
Gareth -- Gareth Reakes, Managing Director +44-1865-811184 Parthenon Computing http://www.parthcomp.com On Thu, 18 Mar 2004, Vincent Finn wrote: > Hi, > > I have recently rewritten a class I have to use SAX instead of the DOM > I did this because the DOM tree was too large and was taking Gigs of memory > SAX takes far less memory but is slower > > I thought that SAX would be quicker since it seems to be simpler and doesn't > create any classes or internal structures. > I can't see any inefficiencies in my code (obviously I have to copy the text data > since the pointer isn't valid outside the function, where as in the DOM I'd just use > it) > so I am curious as to whether the DOM should be quicker > > Can anyone tell me why this might be so? > Is this expected? > > The reason I ask is because if SAX would be expected to be slower then that's > fine and I'll leave it as is, memory is more important, > but if it should be faster (or the same) I would like to track down what I am doing > wrong > > Vin > > ------------------------------------------------------------------------ > [EMAIL PROTECTED] > ------------------------------------------------------------------------ > My opinions may have changed, but not the fact that I am right. > ------------------------------------------------------------------------ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]