[dev] Themes changes

Michael M Slusarz slusarz at horde.org
Tue Nov 23 19:10:53 UTC 2010


Quoting Jan Schneider <jan at horde.org>:

> 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.

Issues with this approach:

* Unlike the registry, which is in a single static location, the  
themes here are in multiple, dynamic locations.  So you need to do  
quite a bit of registry parsing just to obtain the list of base theme  
directories to poll.

I do think that we should move the cache invalidation code out of the  
factory and into the class.  So there will only ever be one  
'App/Theme' cache entry out there, which is continually updated as  
needs warrant.  This change would eliminate this concern.

* There would be significantly more than 4 mtime checks, since there  
can be subdirectories under the main theme directory (e.g. the default  
horde theme would require at least 20 separate mtime checks).

The goal is to remove the # of unnecessary mtime checks to 0 for the  
99% of installations that will never touch the themes directory.   
Thus, the registry version checking should always remain the default  
option.  Developers need an option to allow ease of development, so  
mtime checking could be a reasonable secondary option to provide.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]




More information about the dev mailing list