[jdom-interest] lookup for the parser

Jason Hunter jhunter at collab.net
Fri Mar 23 16:12:01 PST 2001


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