ID: 41193
Updated by: [EMAIL PROTECTED]
Reported By: mauroi at digbang dot com
-Status: Assigned
+Status: Feedback
Bug Type: Performance problem
Operating System: Win32
PHP Version: 5.2.3
Assigned To: dmitry
New Comment:
I don't see any slowdown with current 5.2 and 5.3
5.1.7-dev: 483.88600349426
5.2.7-dev: 479.18510437012
5.3.0-dev: 424.29900169373
Previous Comments:
------------------------------------------------------------------------
[2008-04-03 16:17:24] mh at nextra dot ch
It's still there in 5.3.0-dev.
------------------------------------------------------------------------
[2007-07-14 09:12:46] [EMAIL PROTECTED]
Dmitry, please check this out.
------------------------------------------------------------------------
[2007-06-15 02:49:54] [EMAIL PROTECTED]
Just to add to this report - it looks very much like it's impacting
PHP-GTK (CLI only) Windows users too.
The base demo script in the PHP-GTK distro is reportedly 'twice as
slow' under 5.2.3 as it is under 5.1.6 in the same environment with the
same GTK+ libraries in tow.
The base demo script includes a long list of class files via relative
includes. The relevant bit of code goes:
protected function load_demos()
{
$files = glob(dirname(__FILE__).'/components/*.php');
foreach ($files as $id => $file) {
$GLOBALS['class'] = null;
if (basename($file) != basename(__FILE__)) {
if ([EMAIL PROTECTED]($file)) {
continue;
}
etc
(see
http://cvs.php.net/viewvc.cgi/php-gtk/demos/phpgtk2-demo.php?content-type=text%2Fplain&view=co
for the murky details)
The performance difference is also reported as 'visibly noticeable'
between relative and hard-coded paths under 5.2.3, although that's a
less direct comparison.
Ping me if you think I can help with any donkeywork, this one's fairly
major for us and may hold up our 'surprise release', given that the demo
scripts number rather less than the number of includes you could expect
in a RL application.
- Steph
------------------------------------------------------------------------
[2007-05-09 15:47:49] mauroi at digbang dot com
Thanks Mark... The original example comes from a real life application,
but yours is far much better. Hope someone will take a look at it now
it's simpler.
Regards,
Mauro.
------------------------------------------------------------------------
[2007-05-09 15:36:37] mark at markwest dot me dot uk
I can reproduce what I believe to be the same issue too.
A very simple test case to highlight this issue is
<?php
for ($i = 0; $i < 5000; $i++) {
if (is_readable('test.txt')) {
// dummy - do nothing!
}
}
?>
Sample results, measured using xdebug, are as follows
is_readable with non-existent file
5.1.6 5000 calls to is_readable taking 166ms
5.2.2 5000 calls to is_readable taking 1511ms
is_readable with existing file
5.1.6 5000 calls to is_readable taking 135ms
5.2.2 5000 calls to is_readable taking 151ms
When the file isn't present php 5.2.x takes significantly longer that
in previous releases.
-Mark
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/41193
--
Edit this bug report at http://bugs.php.net/?id=41193&edit=1