[pLog-svn] The use of constants

Ammar Ibrahim ammar.ibrahim at gmail.com
Mon Apr 23 06:56:20 EDT 2007


I had figures, I can regenerate them. I'm not using 1.2.x this is why I don'
have lt_include. define() was around 60% of page execution when a page was
cached. and you have only 300 define() calls. If you were to generate an
index page with lots of data and statistics from different parts, they can
grow to thousands.

Which version of PHP are you using? and are you using APC ?


btw, for profiling I heard that APD is better, the author of xdebug is my
friend and he mentioned that APD might have a slight advantage over xdebug
in profiling currently.


- Ammar

On 4/23/07, Tsz Ming WONG <tszming at gmail.com> wrote:
>
> I have just run a simple xdebug profiling on the LT blog index (1.2.1)
>
> Function, Total Self, Total Cum, Calls
>
> php::define, 1.9ms, 1.9ms, 300
> lt_include, 270ms, 805ms, 134
>
>
> in fact, not that slow as you mentioned...do you have any figures?
>
>
> best regards,
> tszming
>
> On 4/23/07, Ammar Ibrahim <ammar.ibrahim at gmail.com> wrote:
> >
> >
> > On 4/23/07, Tsz Ming WONG <tszming at gmail.com> wrote:
> > > 1. if you don't use constant, what will you use? hard code them into
> the
> > codes?
> >
> > Global  variables, or in PHP5 static class variables.
> >
> > > 2. the real slow down is include_once() AFAIK
> >
> > true, this is a slow down as well. In my profiling tests. include_once
> took
> > so much time, but less than define()
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://limedaley.com/pipermail/plog-svn/attachments/20070423/9e475260/attachment.htm 


More information about the pLog-svn mailing list