[Seaside] Tasks and reusing components

Lukas Renggli renggli at gmail.com
Tue Feb 23 11:00:29 UTC 2010


Thank you for the script. This helped me to quickly reproduce and
understand the problem.

The thing is that Seaside 2.8 and 3.0 do only backtrack components
that are in the render tree. Earlier versions of Seaside backtracked
all components that were ever instantiated (visible or not). This
considerably increased memory consumption and load because all
components were cached for a long time and iterated and copied with
every request.

>From Seaside 2.8 on we limited the backtracking to visible components
in the render tree. This is almost always correct, except when you
reuse components in tasks. Since this is not commonly done, we decided
to accept that. Congratulation, you are the first one to discover it
:-)

The behavior can be easily fixed by adding the components that you
store to the render tree, so that Seaside backtracks them even if they
are not visible. Just return them as children from your task:

TaskComponentTestTask>>children
	^ Array with: component1 with: component2

This behavior is documented and tested in WADelegationFunctionalTest,
WADelegationTask and WAFlowDelegationTask.

Hope this helps and explains the behavior.

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list