cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Parker" <rob...@webcybernetics.com>
Subject Re: SAX Event cacheing & Generators
Date Thu, 04 May 2000 00:23:57 GMT

----- Original Message -----
From: Williams, Murray Todd <murray_williams@merck.com>
[snip...]
>
> I'm still curious about Rob Parker's claim about static callback methods
> giving a speed gain in his testing. Nevertheless, this is an issue best
> re-examined later.

I must admit that I was suprised at how fast the parsers are - for my
limited
tests I had the following environment...
P-III 500 / NT4.0 JDK1.2.2 Hotspot 2.0 RC2

I was parsing an 800k file - I effectively parsed the file 1000 times in
a loop, recorded the total time in the loop and divided by 1000. The
two approaches I took were to store the file as a String and parse the
string,
and to store a list of  'callbacks'. For the callbacks I compared both
instance methods,
and class methods (statics). My results were...

parse String            250ms
instance callbacks    310ms
static callbacks        110ms

What this indicates to me is that the parser is fast, the invoke method of
the Method class
is slow for instance methods. This is by no means a rigorous test - but it
did satisfy my
curiosity :-)


Mime
View raw message