[jdom-interest] lookup for the parser

Kesav Kumar kesavk at voquette.com
Fri Mar 23 18:09:31 PST 2001


If it takes time or doesn't take any time why to do those steps every time
when we can avoid.

Kesav Kumar
Software Engineer
Voquette, Inc.
650 356 3740
mailto:kesavk at voquette.com
http://www.voquette.com
Voquette...Delivering Sound Information


-----Original Message-----
From: Jason Hunter [mailto:jhunter at collab.net]
Sent: Friday, March 23, 2001 4:12 PM
To: Kesav Kumar
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] lookup for the parser


Kesav Kumar wrote:
> 
> output is
> 
> Took: 1291 msec
> Took: 40 msecs
> Took: 40 msecs
> Took: 40 msecs
> Took: 0 msecs
> Took: 0 msecs
> Took: 160 msecs
> Took: 10 msecs
> Took: 10 msecs
> Took: 0 msecs
> 
> It depends on the m/c also I am using WinNT 533MH JDK1.3 hotspot server.
> This is when I use xerces as the parser if you use JAXP i guess time will
be
> more becaues we have method invocations also.

As we all agreed, the first timing is slow due to class loading.  The
160ms so much later stands out as an interesting timing.  My explanation
is that another process on your system or another thread in the JVM took
over the CPU for much of the 160ms run.  The fact that the code *can*
execute in 0-10ms of clock time implies to me that it's efficient.  The
fact that it doesn't always run at that speed implies that sometimes the
CPU task switches during execution.  A tool like OptimizeIt can provide
true CPU usage numbers.

-jh-



More information about the jdom-interest mailing list