List Info

Thread: Re: Fallback and performance




Re: Fallback and performance
country flaguser name
Switzerland
2007-08-24 10:57:25
Andreas Hartmann schrieb:
> Hi Lenya devs,
> 
> I did some profiling during the last weeks. One of the
most expensive
> operations in Lenya is resolving fallback:// URLs, for
the following
> reasons:
> 
> 
> 1. The URLs are context-sensitive.
> 
> Resolving a fallback URL requires knowledge about the
current
> publication. Currently this is done by the Avalon
Contextualize
> mechanism. Because of this, the FallbackSourceFactory
can't be
> ThreadSafe, and needs to lookup its services upon each
source resolving,
> which is a quite expensive operation.
> 
> A possible solution would be to pass the ID of the
current publication
> to the fallback URL, for instance
> 
>   fallback://slt/f
oo2bar.xsl


Maybe a better option would be

  fallback:slt/f
oo2bar.xsl

This way we could still support the old format and find old
fallback
URLs using a simple search.

If you don't know if the current request is inside a
publication, you
could use

  fallback:{page-envelope:publication-id}slt/f
oo2bar.xsl

which could end up as

  fallback:slt/f
oo2bar.xsl

and would be directly served from the core.


-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )