From:             mauroi at digbang dot com
Operating system: Win32
PHP version:      5.2.2RC1
PHP Bug Type:     Performance problem
Bug description:  relative paths affecting script performance

Description:
------------
First of all, I couldn't reproduce this on Linux. Maybe because it doesn't
exist, or maybe because of worse perfomance on filesystem operations on
Windows.
We've found a performance degradation between PHP5.1.6 and PHP5.2.x (also
checked with PHP5.2.2rc1) when including a file with a relative path. It
gets notorious if using include_path and it has a big number of
directories.
In the provided zip file you'll find 8 directories. Only one of them
contains the file that will be required by the main script. So, script.php
& script1.php show the problem. script.php only requires the file one time,
and even in that case you'll see the difference. script1.php iterates
including a non-existant file (that's why errors ar supressed) and the
execution time is twice as big.
At first glance this could look as a bug with less importance, but any
framework that uses __autoload & include_path with some sort of frequency,
will be slower on PHP5.2 on Windows. Also, any site using MVC (not even
using __autoload) and relative paths could be affected.

Thank you very much.

Reproduce code:
---------------
http://webmail.digbang.com/include_performance.zip

# one inclusion
php -n script.php

# multiple inclusions
php -n script1.php


Expected result:
----------------
Same or better performance on PHP5.2.x than in PHP5.1.6


-- 
Edit bug report at http://bugs.php.net/?id=41193&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41193&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41193&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41193&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41193&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41193&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41193&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41193&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41193&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41193&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41193&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41193&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41193&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41193&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41193&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41193&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41193&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41193&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41193&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41193&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41193&r=mysqlcfg

Reply via email to