Optimization / performance tuning

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Optimization / performance tuning

Phil B
While the actual implementation would likely be application specific, I
was wondering if there are any facilities in Seaside to help optimize
Seaside application performance?  For example, given an invariant
component branch, is there any way to render once at the instance or
session level and cache the resulting output rather than re-rendering
each time the page is loaded?  Any pointers to tips and techniques along
these lines would be appreciated...

Thanks,
Phil

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Optimization / performance tuning

Johan Brichau-2
I have never tried anything along those lines but you could decorate a component and keep the rendered html in that decoration. Something along:

renderContentOn: html
        ^ html html: (generatedHtml ifNil:[ generatedHtml := WAHtmlCanvas builder render:[:html2 | self renderNextOn: html2 ] ])

Though I’m seriously doubting any advantage in performance here by caching. This will only provide an advantage if the rendering code inside that cached component is slow.
If you need a page that is cached, try using a restful url in your app and turn on a front-end webserver page cache for that url.

Disclaimer: I also don’t know if the above really works and what caveats might arise. Keep us posted if you give it a try.

Johan

> On 17 May 2015, at 03:32, Phil (list) <[hidden email]> wrote:
>
> While the actual implementation would likely be application specific, I
> was wondering if there are any facilities in Seaside to help optimize
> Seaside application performance?  For example, given an invariant
> component branch, is there any way to render once at the instance or
> session level and cache the resulting output rather than re-rendering
> each time the page is loaded?  Any pointers to tips and techniques along
> these lines would be appreciated...
>
> Thanks,
> Phil
>
> _______________________________________________
> seaside-dev mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev

_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Seaside] Re: [Seaside-dev] Optimization / performance tuning

Phil B
On Sun, 2015-05-17 at 13:26 +0200, Johan Brichau wrote:
> I have never tried anything along those lines but you could decorate a component and keep the rendered html in that decoration. Something along:
>
> renderContentOn: html
> ^ html html: (generatedHtml ifNil:[ generatedHtml := WAHtmlCanvas builder render:[:html2 | self renderNextOn: html2 ] ])
>

That's an interesting idea... I'll give it a shot.

> Though I’m seriously doubting any advantage in performance here by caching. This will only provide an advantage if the rendering code inside that cached component is slow.
> If you need a page that is cached, try using a restful url in your app and turn on a front-end webserver page cache for that url.
>

If I were just looking at performance from the standpoint of a single
session, I'd agree that it probably wouldn't be worth the effort.
However, with multiple simultaneous sessions/users on a typical
cycle-starved VPS it is another story.  A front-end cache wouldn't help
as only part of the page (i.e. the unchanging components) will be static
across multiple requests.  (Note: the truly static content including css
and javascript is already being served by Apache)

> Disclaimer: I also don’t know if the above really works and what caveats might arise. Keep us posted if you give it a try.
>
> Johan
>
> > On 17 May 2015, at 03:32, Phil (list) <[hidden email]> wrote:
> >
> > While the actual implementation would likely be application specific, I
> > was wondering if there are any facilities in Seaside to help optimize
> > Seaside application performance?  For example, given an invariant
> > component branch, is there any way to render once at the instance or
> > session level and cache the resulting output rather than re-rendering
> > each time the page is loaded?  Any pointers to tips and techniques along
> > these lines would be appreciated...
> >
> > Thanks,
> > Phil
> >
> > _______________________________________________
> > seaside-dev mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev