You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Ex...@nokia.com on 2001/03/30 16:30:05 UTC

RE: cvs commit: jakarta-turbine/src/java/org/apache/turbine/serv ices/template...

> -----Original Message-----
> From: ext Jason van Zyl [mailto:jvanzyl@apache.org]
> Sent: 29. March 2001 16:44
> To: turbine-dev@jakarta.apache.org
> Subject: Re: cvs commit:
> jakarta-turbine/src/java/org/apache/turbine/services/template...

**** deleted ****

> > A general performance problem is that although found 
> layouts are cached and
> > found quickly, the results of failed searches are not. This 
> means that
> > screen specific layouts are searched for every time a new 
> screen is loaded
> > or a cached one reloaded, even though in 99 % of cases the 
> default layout is
> > the one to use (for some reason the mechanism seems to do 
> the search three
> > times for every screen request, I try to check this). Maybe 
> the screen cache
> > of TemplateService could be extended to cache a layout 
> reference also.
> 
> Yes, that should definitely be fixed. I noticed the multiple 
> searching,
> and I'm not sure if that's always been there because I didn't 
> notice it
> until after the changes I made so I may well have introduced that
> undesirable
> behaviour. I don't think it will be hard to weed out.

**** deleted ****

This was my mistake, my module cache was off and I thought that the template
cache uses a separate caching property. Actually, the found layout is cached
for the named screen and can be found directly from the cache after the
first search. There is still quite a lot of searching, either from the cache
or from the disk. Maybe TemplateInfo in RunData could be used in such way
that only one search per request would be needed. Without a cache and
template spec in URL, the templates are searched for by:

TemplateSessionValidator TemplateInfo.setScreenTemplate()
- starts a search for a default screen template.
- starts a search for a screen specific layout template.
- starts a search for a default layout template.

TemplatePage getLayoutTemplateName()
- starts a search for a default screen template.
- starts a search for a screen specific layout template.
- starts a search for a default layout template.

TemplatePage getScreenName()
- starts a search for a default screen template.
- starts a search for a screen specific layout template.
- starts a search for a default layout template.

VelocityScreen getScreenTemplateName()
- starts a search for a default screen template.
- starts a search for a screen specific layout template.
- starts a search for a default layout template.

-- Ilkka

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