One experiment that you can try is to run the samples SAXCount and DOMCount
(using same options) against your xml document to see if your observation
still holds.

Khaled




                                                                           
             "Vincent Finn"                                                
             <[EMAIL PROTECTED]                                             
             omsoft.com>                                                To 
                                       <[EMAIL PROTECTED]>       
             03/18/2004 12:48                                           cc 
             PM                                                            
                                                                   Subject 
                                       RE: SAX v DOM speed                 
             Please respond to                                             
               xerces-c-dev                                                
                                                                           
                                                                           
                                                                           
                                                                           




> Why don't you simply comment out your code in the event
> handlers, and see
> what the performance is like?  If the parsing has reached a
> speed close to
> what you would expect, you can introduce your code bit-by-bit
> or profile it
> to see where the problems are.

yeah I can do that

The reason for the mail was in case I was wrong in expecting SAX to be
quicker
or in case there are obvious beginner mistakes in using SAX that people
might have known

> > m_acData.assign(&pcText[0], &pcText[uiLength]);
>
> Is this a std::vector?  If so, have you tried simply
> reserving a reasonable
> amount of space in the vector before you start?  That can
> often make a big
> difference in the number of delete/new calls the vector makes
> when it has
> to resize itself.

tried and made no difference

something I forgot to mention is that for small files
(250K nodes) the SAX runs at around the same speed, even a little quicker

but when I double the size the DOM becomes quicker until the files get
really big
(10,000K nodes) then the DOM requires so much memory it grinds to a halt

not sure if that means anything to anyone but it seems odd to me that small
files would be faster rather than large

---------------------------------------------------------------------
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]

Reply via email to