RE: [xml-dev] SAX parser for Netbeans [PERFORMANCE]
"Mike Skells" <[email protected]> Thu, 20 Mar 2003 16:35:42 -0000
| Newsgroups | gmane.comp.java.netbeans.modules.xml.devel |
|---|---|
| Message-ID | <CA937007647B6B4C89165A21C9AC4A83B441@dsl-217-155-140-212.zen.co.uk> |
> -----Original Message----- > From: Petr Kuzel [mailto:[email protected]]=20 > Sent: Thursday 20 March 2003 13:55 > To: [email protected] > Subject: Re: [xml-dev] SAX parser for Netbeans [PERFORMANCE] >=20 >=20 > Mike Skells wrote: >=20 > > Hi, > > Sorry for the cross post but I was not sure which list to post this=20 > > to. > > =20 > > I presume that NB uses the standard SAX parser available with JDK >=20 > See org.openide.xml.XMLUtil test: >=20 > System.out.println("" + XMLUtil.createXMLReader(false,=20 > false).getClass()); System.out.println("" +=20 > XMLUtil.createXMLReader(false, true).getClass()); =20 > System.out.println("" + XMLUtil.createXMLReader(true,=20 > false).getClass()); System.out.println("" +=20 > XMLUtil.createXMLReader(true, true).getClass()); >=20 > produces: >=20 > class org.apache.crimson.parser.XMLReaderImpl > class org.apache.crimson.parser.XMLReaderImpl > class org.apache.xerces.parsers.SAXParser > class org.apache.xerces.parsers.SAXParser > =20 > It means that it does not use standard JRE parser. It selects=20 > proper one based on performance characteristics we measured in past. >=20 > > Has anyone looked at using Piccolo http://piccolo.sourceforge.net/=20 > > parser. The tests that I have seen indicate that it is=20 > significantly=20 > > faster. >=20 > What about conformance? Conformance info available from http://piccolo.sourceforge.net/bench.html#summary for the xmlconf http://xmlconf.sourceforge.net/ conformance suite. The information presented there indicates the piccolo is _more_ cormormant than crimson or xerces! =20 > =20 > > I dont know how to configure the sax parser for NB, and I=20 > dont have an=20 > > environment that can test the performance, as it needs to=20 > be tested on=20 > > the actual files that are frequently used. > > =20 > > This could be an easy performance boost for all of NB couldn't it? >=20 > Possibly, the first start only. Then we turn almost all=20 > information contained in XML into binary format caches. SO this means that it would provide a faster startup. Also every time I open a new directory the .nbattrs file is parsed. Every time I open a form the .form file is processed For backgroug information I attach an email from the dom4j newsgroup which has found a 35% gain using Piccolo over Xerces 2.3.0. There are a series of benchmarks available on http://piccolo.sourceforge.net/bench.html#benchmarks which compare crimson xerces picolo and others --forwarded message -- <DISCLAIMER> The test was NOT any official test. All trademarks used in this email=20 are those of their respective organizations. This email contains no=20 warranty expressed or implied and is "AS IS" information. This is not=20 for any official useage. By reading this you release Lucas Software=20 Engineering, Inc. and/or David D. Lucas of any liability in relationship to this information. </DISCLAIMER> I don't see anything wrong with sharing the information, as long as no=20 one is on a benchmark hunt. Some informatino about the simple test. It was an XML parse using some=20 software that I am productizing. The way I use the DOM4J processing is=20 the same regardless of SAX parser. The numbers are not a raw indicator, but a relative indicator with Xerces 2.3.0 as a baseline. Numbers=20 greater than 1.0 represents a faster parse. The tests were run on an 2=20 CPU (1MHz) SMP Linux machine running Sun JDK 1.4.1. My future plans are to package piccolo as part of my releases as a default parser. Another reason I now like piccolo is the fact that various versions of=20 Xerces are all over the place. Particularly inside application servers=20 you end up having to use the one that the base classloader gives you. I hope this information is helpful. :-) Later, Dave Mike Skells wrote: > David, > I would like to forward this email to the netbeans dev newsgroup=20 > unless you have any objections. >=20 > Within netbeans there are a large number of XML document parsed=20 > regularly, so this should benefit that community. >=20 > Mike >=20 >=20 >>-----Original Message----- >>From: [email protected] >>[mailto:[email protected]] On Behalf Of=20 >>David D. Lucas >>Sent: Saturday 22 February 2003 03:37 >>To: David D. Lucas >>Cc: Carlos Barroso; [email protected] >>Subject: Re: [dom4j-user] Has someone tested this? >> >> >>My simple DOM4J test REVISED to include Piccolo 1.03, WOW! >>I see a 35% gain using Piccolo over Xerces 2.3.0. Hmmm, I may end up >>packaging Piccolo with this boost. :-) >> >> >>Parser | Gain >>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>Xerces 2.0.1 | 0.98 >>Xerces 2.3.0 | 1.00 >>FastParser (JAPISoft) | 1.16 >>JDK 1.4.1 (JAXP default) | 1.18 >> >>Piccolo 1.03 | 1.35 >> --=20 +------------------------------------------------------------+ | David Lucas mailto:[email protected] | | Lucas Software Engineering, Inc. (740) 964-6248 Voice | | Unix,Java,C++,CORBA,XML,EJB (614) 668-4020 Mobile | | Middleware,Frameworks (888) 866-4728 Fax/Msg | +------------------------------------------------------------+ | GPS Location: 40.0150 deg Lat, -82.6378 deg Long | | IMHC: "Jesus Christ is the way, the truth, and the life." | | IMHC: "I know where I am; I know where I'm going." <>< | +------------------------------------------------------------+ Notes: PGP Key Block=3Dhttp://www.lse.com/~ddlucas/pgpblock.txt IMHO=3D"in my humble opinion" IMHC=3D"in my humble conviction" All trademarks above are those of their respective owners.