Reinhard Poetz wrote:
Daniel Fagerstrom wrote:

Reinhard Poetz wrote:

Sylvain Wallez wrote:



<snip/>

Ah no, forgot to say: this requires to use JXTemplate and the forms-template-as-jx-macros.



Today I've run some load tests that compare Cocoon Forms using jx-macros and the FormsTransformer. The transformer is *considerably* faster (~ factor of 3!) than the macros and the higher the load the better for the transformer.


Is there any special reason for this?



Macros has been reported to be slow before, IIRC. There is no reason that they should be, maybe they not are cached as they should be? Leszek has made the latest refactorings on the macros so he might have more info.


yes please, Leszek, any ideas?

The template and the macros should be much faster the second time they are execute, otherwise there is some problem with template caching. Do you have any numbers on that?


yes they are but macro execution takes still too long (IMHO)

Besides that does a lot of function calls through Jexl, that requires reflection an might be costly.


hmmm, can't confirm this (but this is only my interpretation of the profiling data and I'm *not* a profiling specialist)


Generally a large part of the work is done at compile time, so it should at least in principle be efficient.


But of course there can be bottle necks in different parts. We need profiling info to know where to start optimizing. Do you have any indication on where most of the time is spend?


AFAICS there is a lot of time spent in the macro execution methods and especially in org.apache.cocoon.template.jxtg.script.Invoker.toDOMNodeList()
AAAAha!. That is a really important information. Invoker.toDOMNodeList is used by jx:set. This instruction is used mainly in jx-macros.xml like this:

<jx:set var="cformsDummy" value="${cformsHelper.startForm(form, macro.arguments)}"/>


-- Leszek Gawron [EMAIL PROTECTED] IT Manager MobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65

Reply via email to