[jdom-interest] RE: Memory and Speed problems with SAXBuilder

MarkW mark.wilson at wilsoncom.de
Sun Mar 2 03:12:53 PST 2003


Hi Mal,
thanks for the info.
- Mark

> -----Original Message-----
> From: Malachi de AElfweald [mailto:malachi at tremerechantry.com] 
> Sent: Saturday, March 01, 2003 9:40 PM
> To: MarkW
> Cc: Jdom-Interest
> Subject: Re: [jdom-interest] RE: Memory and Speed problems 
> with SAXBuilder
> 
> 
> I replaced:
> 		SAXBuilder builder = new SAXBuilder();
> 		return builder.build(new InputStreamReader(in, utf8));
> 
> with:
> 		DOMParser parser = new DOMParser();
> 		parser.parse(new InputSource(new 
> InputStreamReader(in, utf8)));
> 		return (new 
> org.jdom.input.DOMBuilder()).build(parser.getDocument());
> 
> 
> 
> And that seemed to do the trick.  DOMParser by itself was faster than 
> anything using
> JDOM, but I didn't want to change the JDOM code I had everywhere.
> 
> Malachi
> 
> 
> On Sat, 1 Mar 2003 18:28:03 +0100, MarkW 
> <mark.wilson at wilsoncom.de> wrote:
> 
> > Hi Mal,
> > what changes did you make to your code?
> > JDOM + SAXBuilder are embedded quite deep in my app.
> > - Mark
> >
> >> -----Original Message-----
> >> From: jdom-interest-admin at jdom.org 
> [mailto:jdom-interest-admin at jdom.org] 
> >> On Behalf Of Malachi de AElfweald
> >> Sent: Saturday, March 01, 2003 6:13 PM
> >> To: MarkW; Jdom-Interest
> >> Subject: Re: [jdom-interest] RE: Memory and Speed problems with 
> >> SAXBuilder
> >>
> >>
> >> Currently, for a workaround, I am using DOMParser and 
> passing that into 
> >> DOMBuilder.
> >> Instead of 87 seconds, takes about 4.6 seconds.
> >>
> >> Mal
> >>
> >> On Sat, 1 Mar 2003 17:57:11 +0100, MarkW 
> <mark.wilson at wilsoncom.de> 
> >> wrote:
> >>
> >> > Hi people,
> >> > I would also be very interested in a JDOM-Version for 
> JDK 1.4.1 with 
> >> the
> >> > StringBuffer-bug workaround. I´m also having major performance 
> >> problems
> >> > handling relatively small (ca. 800K) files.
> >> > Is there any possibility of a beta 9 release? Sure would 
> make life 
> >> alot
> >> > easier :-)
> >> >
> >> > Regards,
> >> > Mark
> >> >
> >> >> -----Original Message-----
> >> >> From: jdom-interest-admin at jdom.org [mailto:jdom-interest- 
> >> admin at jdom.org] >> On Behalf Of Laurent Bihanic
> >> >> Sent: Friday, February 28, 2003 11:57 AM
> >> >> To: malachi at tremerechantry.com
> >> >> Cc: JDOM-interest
> >> >> Subject: Re: [jdom-interest] RE: Memory and Speed 
> problems with >> 
> >> SAXBuilder
> >> >>
> >> >>
> >> >>
> >> >> Malachi de AElfweald wrote:
> >> >> > I can't downgrade the JVM. How would I upgrade to a 
> newer version? 
> >> >> CVS?
> >> >>
> >> >> Yes, unless Jason decides for a quick code freeze for a beta9.
> >> >>
> >> >> Jason, what's your current view on the beta9 planning ?
> >> >>
> >> >> Laurent
> >> >>
> >> >>
> >> >> > > Malachi
> >> >> > > On Thu, 27 Feb 2003 10:47:27 +0100, Laurent Bihanic > >> 
> >> <laurent.bihanic at atosorigin.com> wrote:
> >> >> > >>
> >> >> >> Hi,
> >> >> >>
> >> >> >> Malachi de AElfweald wrote:
> >> >> >>
> >> >> >>> Worst performer was SAXBuilder (which I originally 
> used because 
> >> we >> >>> were building from
> >> >> >>> an InputStream).  Also, SAXBuilder was the ONLY one 
> that required 
> >> >> the >>> huge amount of
> >> >> >>> heap space.
> >> >> >>
> >> >> >>
> >> >> >> You are probably using JDOM beta8 with JDK 1.4.1. 
> These two are >> 
> >> >> incompatible due to the memory leak bug in StringBuffer 
> introduced in 
> >> >> >> JDK 1.4.1.
> >> >> >> For more information, please see >> >> 
> >> http://developer.java.sun.com/developer/bugParade/bugs/4724129.html
> >> >> >>
> >> >> >> Sun does not plan to fix this bug until JDK 1.5 (Tiger).
> >> >> >>
> >> >> >> To fix this problem, you have 2 solutions:
> >> >> >> 1. Stick to JDOM beta8 but downgrade to JDK 1.4.0 or 1.3.1
> >> >> >> 2. Stick to JDK 1.4.1 and upgrade to the latest JDOM which 
> >> includes a >> >> workaround for the JDK bug.
> >> >> >>
> >> >> >> Laurent
> >> >>
> >> >> _______________________________________________
> >> >> To control your jdom-interest membership:
> >> >> http://lists.denveronline.net/mailman/options/jdom-interest/yo
> >> > uraddr at yourhost.com
> >> >
> >> > _______________________________________________
> >> > To control your jdom-interest membership:
> >> > http://lists.denveronline.net/mailman/options/jdom-> 
> >> interest/youraddr at yourhost.com
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> _______________________________________________
> >> To control your jdom-interest membership:
> >> http://lists.denveronline.net/mailman/options/jdom-interest/yo
> > uraddr at yourhost.com
> >
> >
> >
> 
> 
> 
> -- 
>  
> 




More information about the jdom-interest mailing list