On Mon, Aug 06, 2001 at 10:34:34AM -0500, Andrei Zmievski wrote:
> On Mon, 06 Aug 2001, Zeev Suraski wrote:
> > Drawbacks:
> > - It's slow.  We encourage putting expensive operations into the 
> > module_init, using dl() means they end up being done multiple times.
> > 
> > - Under Apache, it's even worse - since in addition to slowliness, it also 
> > ends up consuming significantly more memory, since any memory the extension 
> > allocates in module_init (e.g., the function entries it registers) cannot 
> > be shared between the processes.
> 
> This doesn't apply under the standalone version, which is what I'm
> mainly worried about.
> 
> > - It prevents the engine from optimizing function calls at compile time, by 
> > looking at what kind of arguments these functions expect.  This is left for 
> > run-time, which results in significantly slower run-time performance.
> 
> Can you quantify "significantly"?
> 
> > - Literally, none of the extensions properly cleans up after itself, 
> > leaving PHP in various degrees of instability.  This rarely translates to 
> > crashes, because people don't usually have a script in which they dl() and 
> > then use a class, another script in which they use the class without 
> > dl()'ing first, and call the 2nd script right after calling the 1st 
> > one.  Still, from a cleanliness perspective and in theory, it's bad.
> 
> I see. I wasn't aware that the extension was supposed to clean up the
> classes it registers. I will fix PHP-GTK behavior on this.

    don't think there's an API for that. we would have to add the
    MODULE_NUMBER to the class-entry and then (when unloading the
    module) also destroy the classes that that module defined. i
    think constants and functions already do this.

    tc

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to