You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Michael Wyraz <mi...@evermind.de> on 2013/09/18 10:17:49 UTC

Tapestry (5.3) Assembly performance

Hi,

a while ago I wrote here about assembly performance in our tapestry app 
(The thread was titled "Speed up page compiling").
Unfortunately until now I did not found the time to track this or to 
exctract a test case that shows the problem. Now I created a 
minimalistic tapetry app that shows the problem:

If a Tapestry page consists of lots of components, the first page load 
after a change takes lot of time. If you reload the page in the browser, 
it loads incredible fast. So it's a problem that occurs during page 
assembly.

The attached page uses only 18 unique components which are nested and 
multiplied that way. This reflects a real-world application that 
consists of lot of "high level" components (e.g. page parts) that are 
assembled by using "lower level components" (e.g. forms or tables) which 
are assembled by "low level components" like buttons, labels, ... which 
bring their own css assets.

If I load the page the first time, it takes ~30 seconds on my machine to 
assemble. Subsequent page loads takes <1 second until I change one of 
the components or the page.

If I remove all css assets, loading time is reduced to ~10-15 seconds.


Do you see any chance to speed up assembly here (e.g. by introducing 
some development cache or so)?

Regards,
Michael.


Re: Tapestry (5.x) Assembly performance - Effect of the ImportWorker

Posted by Michael Wyraz <mi...@evermind.de>.
In my Test application the assembly time is reduced a lot by removing 
all the assets that are imported using @Import annotation.

To show the difference in my real world application, I simply override 
ImportWorker with a class that does absolute nothing.
The effect is:
55s assembly time with ImportWorker vs.
35s assembly time without ImportWorker

So, the effect here is significant but in the real world application 
there are lots of other workers that have effect on page assembly.

This offers 2 different strategies:
1. Making the workers faster.
This is possible for ImportWorker, e.g. by caching asset lookups. But 
it's almost impossible to do it for all workers.
2. Cache parts of the assembled page tree
This is IMO the most promising optimization. Either each part of a page 
might be cached and if something is changed only this part is re-assembled.
Or otherwise the instrumented components are cached for re-use (e.g. a 
button is only instrumented once and this is re-used on every occurence).

What do you think about this?

Regards,
Michael.


> I have changed my app to use tapestry 5.4-alpha-22. Now the first page
> load takes ~1 minute!
> Subsequent page loads require ~1.5-2 seconds.
>
>> Hi,
>>
>> a while ago I wrote here about assembly performance in our tapestry app
>> (The thread was titled "Speed up page compiling").
>> Unfortunately until now I did not found the time to track this or to
>> exctract a test case that shows the problem. Now I created a
>> minimalistic tapetry app that shows the problem:
>>
>> If a Tapestry page consists of lots of components, the first page load
>> after a change takes lot of time. If you reload the page in the browser,
>> it loads incredible fast. So it's a problem that occurs during page
>> assembly.
>>
>> The attached page uses only 18 unique components which are nested and
>> multiplied that way. This reflects a real-world application that
>> consists of lot of "high level" components (e.g. page parts) that are
>> assembled by using "lower level components" (e.g. forms or tables) which
>> are assembled by "low level components" like buttons, labels, ... which
>> bring their own css assets.
>>
>> If I load the page the first time, it takes ~30 seconds on my machine to
>> assemble. Subsequent page loads takes <1 second until I change one of
>> the components or the page.
>>
>> If I remove all css assets, loading time is reduced to ~10-15 seconds.
>>
>>
>> Do you see any chance to speed up assembly here (e.g. by introducing
>> some development cache or so)?
>>
>> Regards,
>> Michael.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>


-- 
Mit freundlichen Grüßen / Regards

Michael Wyraz

evermind GmbH
Schorlemmerstraße 1
04155 Leipzig

Tel.:       +49 (0)341-25 39 66 - 0
Fax:        +49 (0)341-25 39 66 - 1
Funk:       +49 (0)177-73 00 00 3
E-Mail:     michael.wyraz@evermind.de

HRB: 21586
Amtsgericht Leipzig

Geschäftsführer:
Christoph Klemm
Thomas Grünert
Michael Wyraz


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Tapestry (5.x) Assembly performance

Posted by Michael Wyraz <mi...@evermind.de>.
I have changed my app to use tapestry 5.4-alpha-22. Now the first page 
load takes ~1 minute!
Subsequent page loads require ~1.5-2 seconds.

> Hi,
>
> a while ago I wrote here about assembly performance in our tapestry app
> (The thread was titled "Speed up page compiling").
> Unfortunately until now I did not found the time to track this or to
> exctract a test case that shows the problem. Now I created a
> minimalistic tapetry app that shows the problem:
>
> If a Tapestry page consists of lots of components, the first page load
> after a change takes lot of time. If you reload the page in the browser,
> it loads incredible fast. So it's a problem that occurs during page
> assembly.
>
> The attached page uses only 18 unique components which are nested and
> multiplied that way. This reflects a real-world application that
> consists of lot of "high level" components (e.g. page parts) that are
> assembled by using "lower level components" (e.g. forms or tables) which
> are assembled by "low level components" like buttons, labels, ... which
> bring their own css assets.
>
> If I load the page the first time, it takes ~30 seconds on my machine to
> assemble. Subsequent page loads takes <1 second until I change one of
> the components or the page.
>
> If I remove all css assets, loading time is reduced to ~10-15 seconds.
>
>
> Do you see any chance to speed up assembly here (e.g. by introducing
> some development cache or so)?
>
> Regards,
> Michael.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org


-- 
Mit freundlichen Grüßen / Regards

Michael Wyraz

evermind GmbH
Schorlemmerstraße 1
04155 Leipzig

Tel.:       +49 (0)341-25 39 66 - 0
Fax:        +49 (0)341-25 39 66 - 1
Funk:       +49 (0)177-73 00 00 3
E-Mail:     michael.wyraz@evermind.de

HRB: 21586
Amtsgericht Leipzig

Geschäftsführer:
Christoph Klemm
Thomas Grünert
Michael Wyraz