#15876 [Opn->Fbk]: odd slowdown in calling small sections of php code
| From: | iliaa@php.net | Date: | Sun, 06 Oct 2002 01:28:38 +0000 |
| Subject: | #15876 [Opn->Fbk]: odd slowdown in calling small sections of php code | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-21615@lists.php.net to get a copy of this message | ||
ID: 15876
Updated by: iliaa@php.net
Reported By: ddp@deakin.edu.au
-Status: Open
+Status: Feedback
Bug Type: Performance problem
Operating System: linux 2.4.17 & solaris 8
PHP Version: 4.1.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2002-03-05 22:28:39] ddp@deakin.edu.au
Forgot to add the timer code is based on
// Deathhead's Timer
// http://phpclasses.upperdesign.com/browse.html/package/431/
------------------------------------------------------------------------
[2002-03-05 09:27:26] ddp@deakin.edu.au
here's part of the code that causes the problem:
if(isset($timer)) $four=$timer->get();
if( !empty( $ev->repeat_id) )
printf( "&REPEAT_ID=%s", $ev->repeat_id);
if(!empty($end_date)) print "&END_DATE=$end_date";
if(isset($timer)) $five=$timer->get();
Produces the following timings:
four=3.0422940254211, five=3.4876440763474
Interestingly, this is repeatable many times through several different
pages, but in different sections of code (all seemingly innocuous and
they definitely 'behave' correctly most of the time, e.g. 1 time out of
15 in a loop on the same page the above code will give that slow
response, the other times it will execute quickly):
four=4.3863810300827, five=4.3864229917526
Other info (sorry, I don't think I can give you a small script).
Configure line:
'./configure' '--prefix=/opt/local/packages/php-4.1.1'
'--with-jpeg-dir=/opt/local/' '--with-png-dir=/opt/local/'
'--with-zlib-dir=/opt/local/' '--with-xpm-dir=/opt/local/'
'--with-imap=/src/archive/i/imaped/imap-2001a'
'--enable-inline-optimization' '--enable-bcmath' '--enable-calendar'
'--with-regex=system'
'--with-apache=/src/archive/a/apache/prod_build/apache_1.3.23'
'--with-ftp' '--with-oracle'
'--with-oci8=/opt/local/packages/oracle-9.0.1'
'--with-snmp=/opt/local/' '--with-yp' '--enable-ucd-snmp-hack'
'--with-openssl' '--with-config-file-path=/local/etc/httpd/'
'--enable-safe-mode' '--enable-track-vars' '--enable-trans-sid'
'--enable-magic-quotes' '--with-gd=/opt/local/'
'--enable-gd-imgstrttf'
'--enable-xml'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15876&edit=1