Strange performance behavior of IXMLDOMNode>>text in DPRO 5.1.4
- From: Bernhard Kohlhaas <tangofan4u-newsgroups4@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 07 Aug 2005 23:50:29 -0700
Hello all,
I have come a quite a way in building my own framework to parse a particular XML file (that contains information about audio tracks). I can read and parse all the data, however the overall performance slows down dramatically with growing XML files. It takes about 3 minutes to parse an XML file with ca. 10560 tracks.
When using Ian's profiler, I found that 80% of that time was spent in the method IXMLDOMNode>>text. After some more experimentation I also found that the bigger the XML file was, the longer each method execution took, even if it was for the same node at the same position (close to the beginning of the file).
To test the latter I used the coding:
root :=( IXMLDOMDocument new
loadURL: 'file://P:\My Music\mp3testAll.xml')
documentElement.
n := (root childNodes at: 2) firstChild firstChild.
Time millisecondsToRun: [ 10000 timesRepeat: [ n text ] ]and I changed the URL for the various files that I was testing with. My results (taken from the 3rd or 4th execution of the coding above for each URL) are:
No. of tracks File size [KB] Execution time [s]
in file
1 4 0.17
500 614 0.38
1000 1275 0.6
5000 6598 9.6
10559 14262 20.4If anyone cares to reproduce this, I have uploaded the files I tested this with to http://www.geocities.com/bernhard_kohlhaas/xmltest.zip
I find this behavior very peculiar, because I would have expected the execution time to be more or less constant. Is this a Dolphin issue or a problem with Microsoft's implementation of DOM or something else completely?
Finally I loaded Steve Waring's Spray package and tried to parse this with the SAXHandler and the XMLDOMParser, but both choked on the file
'mp3test500.xml' with a walkback:
SAXHandler parseDocumentFromFileNamed: 'mp3test500.xml' XMLDOMParser parseDocumentFromFileNamed: 'mp3test500.xml'
So it looks like I am stuck with the MS parser, thus I'd really like to get it to work faster.
I'd be very grateful for any suggestions on the matter,
Bernhard .
- Follow-Ups:
- Re: Strange performance behavior of IXMLDOMNode>>text in DPRO 5.1.4
- From: Chris Uppal
- Re: Strange performance behavior of IXMLDOMNode>>text in DPRO 5.1.4
- Prev by Date: Re: Error in work with IXMLTemplate
- Next by Date: Understanding SUnit mindset from JUnit background
- Previous by thread: Adding a class variable to a package
- Next by thread: Re: Strange performance behavior of IXMLDOMNode>>text in DPRO 5.1.4
- Index(es):
Relevant Pages
|