cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: Speed of jx-macros compared to FormsTransformer
Date Wed, 18 May 2005 11:48:55 GMT
Reinhard Poetz wrote:

> Daniel Fagerstrom wrote:
>
>> If the null check for value at line 79 in Set is changed to a null 
>> test for this.value we get the behaviour that we should have IMO.
>>
>> I would assume that the various jx:set for helper methods that has 
>> the return type void eavluates to null, and invokes the body 
>> evaluation. It is still strange that doing nothing should take so 
>> long time.
>>
>> Could you test the proposed change and post new profiling data?
>
>
> here we go, same example again:
>
>                         complete       jxt
> cFormsTransformer         170 ms       n/a
> jx_macro_before           350 ms    250 ms
> jx_macro_after*           190 ms    110 ms
>
> * implementing the change proposed by Daniel
>
> details can found here:
> http://people.apache.org/~reinhard/jx_profiling/jx_macro_nostyle_after_change_template_packages.html

>
> http://people.apache.org/~reinhard/jx_profiling/jx_macro_nostyle_before_change_template_packages.html

>
>
>
> here the JMeter comparison using the test in 
> /trunk/tools/jmeter/CocoonForms_JXTemplate.jmx (10 parallel threads):
>
> form1 - JXTemplate
> ******************
>
> url                 count  average  min      max     error    rate
> -------------------------------------------------------------------------
> Load form             10    107    30    280    0,00%    11,2/sec
> Enter Email-Adress (1)    500    114    20    541    0,00%    4,6/sec
> Enter Email-Adress (2)    500    111    20    530    0,00%    4,6/sec
> Start Over Request    500    122    20    541    0,00%    4,5/sec
> TOTAL                   1510    116    20    541    0,00%    13,6/sec
>
> form1 - FormsTransformer
> ************************
>
> url                 count  average  min      max     error    rate
> -------------------------------------------------------------------------
> Load form        10    55    50    80    0,00%    10,5/sec
> Enter Email-Adress (1)    500    156    20    651    0,00%    4,5/sec
> Enter Email-Adress (2)    500    147    20    641    0,00%    4,5/sec
> Start Over Request    500    136    20    621    0,00%    4,6/sec
> TOTAL            1510    145    20    651    0,00%    13,4/sec
>
> I can't explain why, but these two tests show that jx-macro is faster 
> than the transformer now, wow!

That's more like it should be :)

It seem like there is some problem with the Invoker.toDOMNodeList when 
it took 2/3 of the total time when applied on empty bodies.

Now it is harder to get any ideas what to optimize from the profiling 
data, the profiler tool seem round of the figures to much. From the 
figures right now it seem like nearly all of the work is done in code 
outside jxtg which would be good but not seem entirely likely.

It still seem reasonable that the macro invocation is to costly, but we 
need more exact profiling data to verify that.

Anyway, it is great that you have set up profiling and run tests, that 
is exactly what is needed if we want to optimize our code.

/Daniel


Mime
View raw message