[dev] hooks
Marko Djukic
marko at oblo.com
Sat May 10 02:48:43 PDT 2003
Quoting Eric Rostetter <eric.rostetter at physics.utexas.edu>:
> Quoting Chuck Hagenbuch <chuck at horde.org>:
>
> > Quoting Eric Rostetter <eric.rostetter at physics.utexas.edu>:
> >
> > > Sounds interesting. Maybe use the xinetd example also? The hook file
> > > could include a disabled/enabled setting, or we could use the file name
> > > also for this (hook.disabled, hook.enabled, or something like that). If
> > > using a file name convention, we don't have to include/read all them,
> only
> > > the ones matching the pattern. Could save some cpu/disk time.
> >
> > I don't think this makes sense since we're talking about potentially having
> > to include many multiple files on every single page load. File includes are
> > expensive.
>
> Ah, I get that now. I didn't realize they would be loaded so often.
> Yes, then, I agree. Leave it as a single file...
just a thought, could we not create some form of caching? something like a
dynamically generated include file, so that first time around it includes any
individual hook files that are required, but then stores them into a single
file and next time round just includes from this cached file.
ie, we use Horde::callHook() to call up hooks, that in turn checks to see if
there is a cached include file for the invoked script.php, if there isn't it
starts including the individual hook files whilst saving them to single
Horde_Cache container identified by whatever /app/script.php is that is called.
marko
More information about the dev
mailing list