[jdom-interest] Speed!? JDOM vs DOM

Rolf Kluge rolf at smb-tec.com
Tue Mar 6 08:23:26 PST 2001


On Die, 06 Mär 2001, Jason Hunter wrote:
> Rolf Kluge wrote:
> > 
> > //
> > // For building org.jdom.Document.
> > //
> > FileInputStream in = new FileInputStream(filename);
> > SAXBuilder b;
> > b = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
> > Document jdoc = b.build(in);
> > 
> > /* This takes about 12 sec. */
> 
> It'd help if you buffered the input stream.
> 
> -jh-

Not really! I try it with ...
//
FileInputStream in = new FileInputStream(filename);
BufferedInputStream bin = new BufferedInputStream(in);
builder = new SAXBuilder(saxDriverClass);
Document jdoc = builder.build(bin);
//
.. but it takes nearly the same time (11,5 sec).

??

______________________________________________________________________
Rolf Kluge                                     mailto:rolf at smb-tec.com
SMB GmbH                                        http://www.smb-tec.com

-- 
______________________________________________________________________
Rolf Kluge                                     mailto:rolf at smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




More information about the jdom-interest mailing list