<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=760232810-26042007><FONT face=&#26032;&#32048;&#26126;&#39636; 
color=#0000ff size=2>Hi Ammr:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=760232810-26042007><FONT face=&#26032;&#32048;&#26126;&#39636; 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=760232810-26042007><FONT face=&#26032;&#32048;&#26126;&#39636; 
color=#0000ff size=2>I think we can't modification our current implementation 
becasue we have to meet most server requuirement. But, maybe you can try 
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=760232810-26042007><FONT face=&#26032;&#32048;&#26126;&#39636; 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=760232810-26042007><FONT face=&#26032;&#32048;&#26126;&#39636; 
color=#0000ff size=2><A 
href="http://t3.dotgnu.info/blog/php/my-first-php-extension.html">http://t3.dotgnu.info/blog/php/my-first-php-extension.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=760232810-26042007><FONT face=&#26032;&#32048;&#26126;&#39636; 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=760232810-26042007><FONT face=&#26032;&#32048;&#26126;&#39636; 
color=#0000ff size=2>Mark</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=zh-tw dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> plog-svn-bounces@devel.lifetype.net 
  [mailto:plog-svn-bounces@devel.lifetype.net] <B>On Behalf Of </B>Ammar 
  Ibrahim<BR><B>Sent:</B> Thursday, April 26, 2007 6:05 PM<BR><B>To:</B> 
  plog-svn@devel.lifetype.net<BR><B>Subject:</B> Re: [pLog-svn] The use of 
  constants<BR></FONT><BR></DIV>
  <DIV></DIV>You're right Oscar. Anyhow, as of next week we'll start rewriting 
  our system on LT1.3 . We will benchmark and profile quite a lot as we go, and 
  we'll share our findings/fixes/features with 
  you.<BR><BR>Thanks,<BR>&nbsp;&nbsp; Ammar<BR><BR><BR>
  <DIV><SPAN class=gmail_quote>On 4/25/07, <B class=gmail_sendername>Oscar 
  Renalias</B> &lt;<A 
  href="mailto:oscar@renalias.net">oscar@renalias.net</A>&gt; wrote:</SPAN>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Just 
    as I thought, you can't remove constants just because they're<BR>"slow" 
    without compromising code readability a *lot*. Would you rather<BR>see 
    switch() or if() statements where a variable is checked against <BR>proper 
    constant names or against "magic" numbers? I suppose end users<BR>and server 
    admins don't really care that much but we as developers do<BR>care about 
    these things.<BR><BR>Now with all said, you can try to edit the file 
    <BR>class/plugin/eventlist.properties.php and remove its contents. 
    It<BR>contains a bunch of constants that identify each one of the 
    events<BR>generated by the core, and they're not really needed if you're 
    not<BR>using certain plugins. If any of you has the time to benchmark LT 
    with<BR>and without these constants defined, please let us know about 
    the<BR>results.<BR><BR>Oscar<BR><BR>On 4/23/07, Oscar Renalias &lt;<A 
    href="mailto:oscar@renalias.net"> oscar@renalias.net</A>&gt; wrote:<BR>&gt; 
    How are you supposed to use global variables in method definition? As 
    in:<BR>&gt;<BR>&gt; function myFunction( $param1 = MY_CONSTANT 
    )<BR>&gt;<BR>&gt; Versus:<BR>&gt;<BR>&gt; function myFunction( $param1 = 
    $can_I_use_a_global_variable_here ) <BR>&gt;<BR>&gt; Does that even work?? 
    Or please clarify what you mean by "global variables".<BR>&gt;<BR>&gt; 
    Oscar<BR>&gt;<BR>&gt; On 4/23/07, Ammar Ibrahim &lt;<A 
    href="mailto:ammar.ibrahim@gmail.com">ammar.ibrahim@gmail.com </A>&gt; 
    wrote:<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; On 4/23/07, Reto Hugi &lt;<A 
    href="mailto:plog@hugi.to">plog@hugi.to</A>&gt; wrote:<BR>&gt; &gt; &gt; 
    Ammar Ibrahim wrote:<BR>&gt; &gt; &gt; &gt; I don't like globals as well, 
    they are a bad software engineering <BR>&gt; &gt; &gt; &gt; practice. But if 
    they are faster, I don't care.<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; well, we 
    do. Else we wouldn't do OO programming. sometimes it's worth to<BR>&gt; &gt; 
    &gt; sacrifice speed over <BR>&gt; &gt;<BR>&gt; &gt; What if the sacrifice 
    is major? we could at least use global variables<BR>&gt; &gt;<BR>&gt; &gt; 
    &gt; &gt; Benchmark and let us know :) but use PHP5<BR>&gt; &gt; 
    &gt;<BR>&gt; &gt; &gt; Things you should know and keep in mind during the 
    performance tests: <BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; - most or at least a 
    significiant amount of users have php4 not php5.<BR>&gt; &gt; &gt; that's 
    why we provide backward compliance. we won't implement<BR>&gt; &gt; &gt; 
    improvements that brake the compliance. <BR>&gt; &gt;<BR>&gt; &gt; of 
    course.<BR>&gt; &gt;<BR>&gt; &gt; &gt; - we are not really interested in 
    improvements other versions than<BR>&gt; &gt; &gt; lifetype 1.2 as this is 
    the version we support.<BR>&gt; &gt;<BR>&gt; &gt; I'm migrating to 
    1.2<BR>&gt; &gt;<BR>&gt; &gt; &gt; - inlude_once was replaced with 
    lt_include in 1.2 to improve performance<BR>&gt; &gt; &gt; (lt_include does 
    not lead to file access operations on every call -<BR>&gt; &gt; &gt; there 
    might be more to it, but that's what I remember...) <BR>&gt; &gt; &gt; 
    _______________________________________________<BR>&gt; &gt; &gt; pLog-svn 
    mailing list<BR>&gt; &gt; &gt; <A 
    href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</A><BR>&gt; 
    &gt; &gt; <A 
    href="http://limedaley.com/mailman/listinfo/plog-svn">http://limedaley.com/mailman/listinfo/plog-svn</A><BR>&gt; 
    &gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; 
    _______________________________________________<BR>&gt; &gt; pLog-svn 
    mailing list<BR>&gt; &gt; <A 
    href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</A><BR>&gt; 
    &gt; <A 
    href="http://limedaley.com/mailman/listinfo/plog-svn">http://limedaley.com/mailman/listinfo/plog-svn</A><BR>&gt; 
    &gt;<BR>&gt;<BR>_______________________________________________ <BR>pLog-svn 
    mailing list<BR><A 
    href="mailto:pLog-svn@devel.lifetype.net">pLog-svn@devel.lifetype.net</A><BR><A 
    href="http://limedaley.com/mailman/listinfo/plog-svn">http://limedaley.com/mailman/listinfo/plog-svn</A><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>