[Seaside] Tasks and reusing components
rh at 4096.sk
Tue Feb 23 11:06:30 UTC 2010
Ah, children! Of course!
The cause of, and the solution to all seaside's problems ;-)
Thanks, it works now
On Tue, 23 Feb 2010, Lukas Renggli wrote:
> 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:
> ^ Array with: component1 with: component2
> This behavior is documented and tested in WADelegationFunctionalTest,
> WADelegationTask and WAFlowDelegationTask.
> Hope this helps and explains the behavior.
> Lukas Renggli
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside