#29293 [Fbk->NoF]: some functions are slower (10x slowest) than using php4

From: Date: Sat, 19 Feb 2005 00:00:17 +0000
Subject: #29293 [Fbk->NoF]: some functions are slower (10x slowest) than using php4
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-74282@lists.php.net to get a copy of this message
ID: 29293 Updated by: php-bugs@lists.php.net Reported By: j at bolinos dot ch -Status: Feedback +Status: No Feedback Bug Type: Performance problem Operating System: Windows XP PHP Version: 5.0.0 New Comment: No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2005-02-11 15:19:26] tony2001@php.net Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip ------------------------------------------------------------------------ [2004-08-20 02:20:53] tmgh at www dot deyang dot gov dot cn i have the same result.it seems that php4 is faster than php5. ------------------------------------------------------------------------ [2004-08-19 22:10:40] cyanide320 at hotmail dot com It seems that the problem is related to several file-related functions. I have personally experienced this also with the is_dir function. ------------------------------------------------------------------------ [2004-07-21 12:21:50] j at bolinos dot ch Description: ------------ file_exists, include, include_once, require, require_once and getimagesize are about 10x slower than their php4 version. Using Apache 2.0.48, Windows XP Php 5.0.0 versus Php 4.3.6 on the same computer. Reproduce code: --------------- Tested using this function either with file_exists, include, include_once, require, require_once and getimagesize function FileExists($file,$nb,$para="") { $aT=array(); $aT[0]=microtime(false); for($t=0;$t<$nb;$t++){ file_exists($file); } $aT[1]=microtime(false); return $aT; } Actual result: -------------- Mean for 100 repeated tests Using php 5.0.0: include mean: 0.0029407 (s) require mean: 0.0030178 (s) include_once mean: 0.0022040 (s) require_once mean: 0.0023427 (s) file_exists mean: 0.0000355 (s) file_exists and clearstatcache mean: 0.0013877 (s) Using php 4.3.6: include mean: 0.0002966 (s) require mean: 0.0002929 (s) include_once mean: 0.0001056 (s) require_once mean: 0.0001038 (s) file_exists mean: 0.0000028 (s) file_exists and clearstatcache mean: 0.0000749 (s) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29293&edit=1

« previous php.bugs (#74282) next »