|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29293 some functions are slower (10x slowest) than using php4
Submitted: 2004-07-21 12:21 UTC Modified: 2005-02-19 01:00 UTC
Avg. Score:4.7 ± 0.7
Reproduced:8 of 8 (100.0%)
Same Version:4 (50.0%)
Same OS:2 (25.0%)
From: j at bolinos dot ch Assigned:
Status: No Feedback Package: Performance problem
PHP Version: 5.0.0 OS: Windows XP
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-07-21 12:21 UTC] j at bolinos dot ch
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="")

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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-19 22:10 UTC] 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-08-20 02:20 UTC] tmgh at www dot deyang dot gov dot cn
i have the same seems that php4 is faster than php5.
 [2005-02-19 01:00 UTC] php-bugs at lists dot php dot net
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".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 06:01:34 2024 UTC