[dev] Re: [cvs] commit: imp mailbox.php imp/lib Mailbox.php Message.php

Michael M Slusarz slusarz at bigworm.colorado.edu
Mon Jun 16 12:55:23 PDT 2003


Quoting Chuck Hagenbuch <chuck at horde.org>:

|   How bad a hit *is* define()? This is pretty confusing having 3 sets of
|   constants around. If it's really bad, can we just move to string
|   actions? Seems like that'd be easier to follow.

I'm just getting this info from apd - now, even after i moved some of those
defines out of IMP, it is still the 4th on the list of functions in
user+system time spent in the subroutines - right at a tenth of a second
when loading mailbox.php:

         Real         User        System             secs/    cumm
%Time (excl/cumm)  (excl/cumm)  (excl/cumm) Calls    call    s/call  Memory
Usage Name
--------------------------------------------------------------------------------------
...
  6.6  0.54  0.54   0.08  0.08   0.01  0.01   130   0.0007    0.0007        
   0 define

For reference purposes, #1 is Horde::extensionExists() (those damn
extension_exists calls are expensive - why we cache them), #2 is is_null()
calls (simply because there are so many of them - 877 to be exact), and #3
is _().

That seems like a big enough hit, to me at least, to justify moving all of
those unneeded define calls out of IMP (and anywhere else for that matter).
 Other ways of handling actionIDs are perfectly fine with me.

michael

______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder


More information about the dev mailing list