#28918 [NEW]: include_once() relatively slow

From: Date: Fri, 25 Jun 2004 11:20:01 +0000
Subject: #28918 [NEW]: include_once() relatively slow
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-61359@lists.php.net to get a copy of this message
From: mail at spybreak dot de Operating system: Windows 2000 PHP version: 4.3.6 PHP Bug Type: Performance problem Bug description: include_once() relatively slow Description: ------------ I noticed when timing my scripts that include_once is pretty slow when one looks at how simple of a job this function has. I timed an example further down. Please don't disregard this request just because it might not seem very important. If it can't be improved though, C is not my domain, nevermind and thanks for reading :) Reproduce code: --------------- include_once(components_dir.'style.php'); /* 0.0026910305023193 seconds */ include_once(components_dir.'style.php'); /* 0.00091314315795898 seconds only three times as fast as the first include_once call! whereas the next example…*/ $array = array('somefile.php','somefile.php','somefile.php','somefile.php','somefile.php', 'somefile.php','somefile.php','somefile.php','somefile.php','somefile.php'); in_array('someotherfile.php',$array); /* only takes 0.000065088272094727 seconds and hence is 40x as fast (if my calculations are correct) */ -- Edit bug report at http://bugs.php.net/?id=28918&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28918&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28918&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28918&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28918&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28918&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28918&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28918&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28918&r=support Expected behavior: http://bugs.php.net/fix.php?id=28918&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28918&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28918&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28918&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28918&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28918&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28918&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28918&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28918&r=float

« previous php.bugs (#61359) next »