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 08:33:38 GMT
Sylvain Wallez wrote:

> Leszek Gawron wrote:
>
>> Reinhard Poetz wrote:
>
>>>
>>> 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)}"/>
>
> cformsDummy counts for 10 of the 25 <jx:set> in jx-macros.xml. So 
> having a <jx:call> would cut down a fair number of them.

As described in an earlier mail, there is (probably) a bug in the jx:set 
implementation that make it call Invoker.toDOMNodeList when it shouldn't.

I'm against having a special instruction for performing side effects, as 
side effects in templates is an anti pattern IMO. As long as we have 
powerfull ELs we can't forbid it, but at least I think it is good that 
it creates uggly looking code ;)

And as we allready have discussed, most of the uses of side effects in 
jx-macros would go away with the use of XMLizable in widgets.

/Daniel


Mime
View raw message