[dev] [cvs] commit: framework/Horde/Horde Registry.php

Michael M Slusarz slusarz at mail.curecanti.org
Sun Nov 27 11:15:48 PST 2005


Quoting Michael M Slusarz <slusarz at curecanti.org>:

> slusarz     2005-11-27 11:08:27 PST
>
>   Modified files:
>     Horde/Horde          Registry.php
>   Log:
>   Any preference caching should be handled by Prefs::, not concurrently by
>   Registry::.  We are essentially doing the same thing in two places.
>
>   Revision  Changes    Path
>   1.269     +7 -36     framework/Horde/Horde/Registry.php
>
>   Chora Links:
>   
> http://cvs.horde.org/diff.php/framework/Horde/Horde/Registry.php?r1=1.268&r2=1.269&ty=u

Does this fix Bug 3050?

I really hate messing too much with prefs/registry core code, but when 
profiling our code (notably sidebar.php) I noticed something off.  We 
were generating a new prefs object everytime we changed scope.  
However, the prefs object is exactly the same no matter what the scope 
is since it is based on the prefs driver.  Therefore, the code change 
to simply change the scope in an existing prefs object instead of 
creating a brand new one.

The biggest issue with doing it the old way (and how I caught the 
problem) is that every prefs object created registered a shutdown 
function.  Thus, in the case of sidebar.php, there were 10+ shutdown 
functions being run that were doing exactly the same thing.  yuck.  
This should be fixed now.  But, as always, trying to nail 
registry/prefs fixes on the first try is not easy so hopefully I didn't 
break existing behavior horribly.

michael

_______________________________________
Michael Slusarz [slusarz at curecanti.org]


More information about the dev mailing list