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://{pubId}:xslt/foo2bar.xsl


Maybe a better option would be

  fallback:{pubId}:xslt/foo2bar.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}:xslt/foo2bar.xsl

which could end up as

  fallback::xslt/foo2bar.xsl

and would be directly served from the core.


-- Andreas


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to