[horde] Using hooks to permanently set from_addr and fullname

Kevin Myer kevin_myer at iu13.org
Fri Jul 22 19:44:41 PDT 2005


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Are you sure this is from preferences hooks? The check on line 707 of
> Prefs.php:
>
>        if (!is_null($this->_hooksCalled) && !Auth::getAuth()) {
>            return;
>        }
>
> ... looks suspicious to me - should that be && Auth::getAuth(), instead
> of ! ? Anyone?

Ok, from a calltrace of an import of a single event into a calendar, 
that is the
critical point that is generating all the directory server connections.  I
changed !Auth::getAuth() to Auth::getAuth() and no extra connections were
created.  I'm importing a 200Kb event file now, which normally 
generates 35000+
connections and with that change, there's the normal background # of
connections (about 10), although the overall import is dreadfully slow.

> .. but even so, prefs are cached during a session. So unless that
> caching is failing somehow, the hooks should only be called once per
> session - I don't see any place that calls Prefs::_callHooks() outside
> of Prefs::retrieve(), after we return if prefs are found cached.

So if Prefs::_callHooks() is only invoked by Prefs::retrieve(), then is
something wrongly calling Prefs::retrieve?  Something (each event?) 
generates 4
hook calls - 2 to from_addr, 2 to fullname.  I'm also trying to figure 
out what
data structures must be getting created on an import.  I go from having 
a 200Kb
file that I'm importing to having a single Apache process with a memory 
size of
100-300Mb, which troubles me a little bit.

Kevin

-- 
Kevin M. Myer
Senior Systems Administrator
Lancaster-Lebanon Intermediate Unit 13  http://www.iu13.org




More information about the horde mailing list