[jdom-interest] Speed issues
Alex Rosen
arosen at novell.com
Tue Mar 18 06:23:12 PST 2003
The first time I use any class library, it takes a lot longer, because
the VM has to load and verify the classes (and maybe JIT some of them).
Then after that it runs faster. Is that what you're seeing?
Alex
>>> "Paul Hlasnicek" <phlasnicek at mapmobile.com> 3/17/2003 10:55:48 AM
>>>
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/youraddr@yourhost.com
More information about the jdom-interest
mailing list