I dislike ASP, but I dislike offhand incorrect remarks like COM is
crappy at string parsing just as much, and I hear the msxml sucks
remark from java people so much...so forgive me if the length of this
post seems like a bit like overreacting. I just want to put it to a
rest for myself if no one else.

Seeing as no one using COM/ASP uses anything other than msxml to parse
xml, I must infer you are speaking of msxml. Which according to the
only benchmarks I have ever seen is much faster than anything else
around.

http://www.xml.com/pub/a/2001/03/28/xsltmark/?page=2

The above benchmarks had 3.0 beating everyone else by a good margin,
and it was widely reported that 4.0 with the newparser bit set shows a
2-8x performance increases over 3.0. Far from crappy...

Out of curiosity, and an aversion to talking out of my ass, I did some
benchmarks.

I grabbed the Bible in XML format from here
http://www.softcorporation.com/products/xmllight/largeDoc.zip

Running MX Updater 2, Sun JRE 1.4.1_02, debugging on. I ran each
template at least a dozen times to get any compiling and caching out
of the way. Then ran each template 5 times to get the ranges.

MX: 2925-5528ms Actually got higher each time except the last
run...3500ms seemed to be the average time.

<cffile action="READ" file="d:\www\xml\ot.xml" variable="xmlStr">

<cfset xmlDoc = xmlParse(xmlStr)>
<cfset verse = xmlSearch(xmlDoc, "/tstmt/bookcoll/book/chapter/v")>
<cfoutput>#verse[43].xmlText#</cfoutput>



MSXML: 1663-3625ms The 3600ms time seemed to be an abberation, but it
came up during the run, the vast majority seemed near 2000ms.

<cffile action="READ" file="d:\www\xml\ot.xml" variable="xmlStr">

<cfset objXMLDOM = createObject("COM", "MSXML2.DOMDocument.4.0")>
<cfset rs = objXMLDOM.setProperty("NewParser", true)>
<cfset objXMLDOM.async = false>
<cfset XMLloadSuccess = objXMLDOM.loadXML(xmlStr)>
<cfset verse = objXMLDOM.selectNodes("/tstmt/bookcoll/book/chapter/v")>
<cfoutput>#verse.item(42).text#</cfoutput>

I do believe the results speak for themselves...msxml being
instantiated from within MX, still outperforms the native crimson.
I doubt msxml would scale from within MX though.

I'd agree with the reccomendation to try other java based parsers
though. Especially if the alternative is ASP...blech

-- 
mailto:[EMAIL PROTECTED]
Thursday, March 13, 2003, 7:55:34 PM, you wrote:

EY> How big are your docs? Are you looping through data and doing an
EY> XMLparse? Is an XML parse fully necessary? Perhaps a Regex might fit
EY> better? Without seeing the underlying code or your desired end result,
EY> it's hard to tell.

EY> AFAIK, ASP/COM solutions are crappy at text parsing, if there's one
EY> thing Java is good at - it's crawling through text.

EY> Also remember w/ CFMX you're no longer limited to just inherit
EY> functionality. I believe CF uses Crimson, if I'm not mistaken. Solid for
EY> most peoples needs, but there are others for the performance driven
EY> tweakers - try some other Java solution, make your own class. Ahh, the
EY> wonders of a java based app server. 

EY> Here's a couple of interesting parsers that were recently featured on
EY> freeroller.net:

EY> Piccolo - http://piccolo.sourceforge.net/ 

EY> Sparta - http://sparta-xml.sourceforge.net/

EY> Erik Yowell
EY> [EMAIL PROTECTED]
EY> http://www.shortfusemedia.com


EY> -----Original Message-----
EY> From: Jay Jennings [mailto:[EMAIL PROTECTED] 
EY> Sent: Thursday, March 13, 2003 4:42 PM
EY> To: CF-Talk
EY> Subject: XMLParse at 100%

EY> Is XMLParse() pegging the CPU at 100% (sometimes for a few seconds) 
EY> something that's normal? If I switch to an ASP-based version of that 
EY> will I see better performance? Right now the routine using XMLParse() 
EY> is bringing the server to its knees a little too often.

EY> Most of the app has already been switched to .NET and this problem is 
EY> helping to put the final nail in the CF coffin at my company. Any help 
EY> would be greatly appreciated.

EY>   Jay Jennings

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to