[jdom-interest] Speed issues

MarkW mark.wilson at wilsoncom.de
Tue Mar 18 00:08:42 PST 2003

Hi Paul,
might be something to do with the memory problem concerning StringBuffer
in JDK 1.4.1. It is used in SAXHandler to output the xml doc.
Try JDK 1.4.0 or I can supply you with a patched JDOM b8 which deals
with this problem.


> -----Original Message-----
> From: jdom-interest-admin at jdom.org 
> [mailto:jdom-interest-admin at jdom.org] On Behalf Of Paul Hlasnicek
> Sent: Monday, March 17, 2003 4:56 PM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] Speed issues
> Hi, Let me give you an idea of what I am doing and then 
> present my problem.
> I am using jdk 1.4.1 and JDOM in a Unix environment.  My code 
> is middleware
> and communicates to the application through socket calls.  So 
> I create a
> document, add in all of the pieces and send the xml string 
> over the socket
> where it is parsed by a 'C' xml parser.  I also receive the 
> answer data as
> an xml string from the socket where I parse and send the data 
> to the user
> interface.
> There are times that after I received a response, I have to 
> create a new
> document along with root and children and respond back to the 
> application.
> In all of this, speed is very important.
> Here is my problem:  The first time that I create the 
> document, it takes
> well over 500 ms (sometimes up to 750 ms) just to create the 
> xml string, but
> when I have to create a new document to respond with, it only 
> takes about
> 150 ms.  This also happens when I parse the xml string that I 
> receive from
> the socket.  Why am I experiencing these huge differences in 
> time to create
> and parse?  What can I do to prevent this?  Is there a way to 
> initialize the
> document?
> Thanks,
> Paul Hlasnicek
> _______________________________________________
> 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