[dev] Themes changes

Jan Schneider jan at horde.org
Tue Nov 23 10:10:50 UTC 2010


Zitat von Michael M Slusarz <slusarz at horde.org>:

> #2: Themes caching.  Yay.  Had discussions months ago when I  
> originally altered the theme structure, and finally got around to it.
>
> Works by caching the file existence of theme files for each of the following:
>
> Horde app, 'default' theme
> Horde app, theme
> [If current app is not horde]:
> App, 'default' theme
> App, theme
>
> Thus, there is a cache entry for, e.g., 'imp with the silver theme'.  
>  On subsequent runs, there is no reason to do file existence checks  
> - we just check the bit masks of the cached data to determine which  
> image/sound/css file to display.  A quick benchmark on a random page  
> in IMP was showing 330+ file_exists() calls per page load.  This has  
> now gone down to 0.
>
> Outside of theme development, there is no reason caching should not  
> be used.  To aid theme development, still need to add an option to  
> disable theme caching and a command-line script that will clear all  
> theme cache data.

Why not doing mtime checks on the (at most) 4 directories that host  
theme files for an application? This should be fast enough, and we  
already do this successfully with registry cache invalidation.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list