[jdom-interest] Speed issues
phlasnicek at mapmobile.com
Mon Mar 17 07:55:48 PST 2003
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
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
More information about the jdom-interest