#27215 [Fbk->Opn]: include in php5 is very slow
| From: | waboring at 3gstech dot com | Date: | Wed, 11 Feb 2004 19:00:23 +0000 |
| Subject: | #27215 [Fbk->Opn]: include in php5 is very slow | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-54769@lists.php.net to get a copy of this message | ||
ID: 27215
User updated by: waboring at 3gstech dot com
Reported By: waboring at 3gstech dot com
-Status: Feedback
+Status: Open
Bug Type: Performance problem
Operating System: Redhat 9
PHP Version: 5CVS-2004-02-10 (dev)
New Comment:
I'm not sure what else you want me to provide. The bug is very clear.
There is a big performance issue with php5 just including a file with a
class in it. php4 does not show this problem.
I have created a directory on my web server that shows the test code.
http://phphtmllib.newsblob.com/bug/index.php
This is running in an php4 environment and it takes 0.005s to execute
the index.php code.
I don't have php5 running on this machine, as it is a production box.
You can look at the source code of the scripts by pointing to the
following files.
http://phphtmllib.newsblob.com/bug/index.phps
http://phphtmllib.newsblob.com/bug/includes.phps
http://phphtmllib.newsblob.com/bug/ContainerClass.phps
http://phphtmllib.newsblob.com/bug/XMLTagClass.phps
http://phphtmllib.newsblob.com/bug/HTMLTagClass.phps
When I run this on my machine (Pentium 4 1.8Ghz 512M ram)
php4: 0.005s
php5: 0.100s
Previous Comments:
------------------------------------------------------------------------
[2004-02-11 05:11:03] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2004-02-10 20:19:37] waboring at 3gstech dot com
Description:
------------
I am the maintainer of phphtmllib. I just got the latest php5 from cvs
built and working, but have noticed a serious performance issue with
just doing includes.
reproduce:
download phphtmllib from
http://phphtmllib.newsblob.com/downloads/download.php?version=2.4.0
tar -zxvf phptmllib-2.4.0.tgz into your favorite location
create a simple script that does nothing but include the library
include file. "phphtmllib-2.4.0/include.inc"
The execution of which takes over 1 second to complete.
This script takes 0.075 to complete in php 4.3.2
Reproduce code:
---------------
<?php
$phphtmllib = "/location/where/you/installed/it";
include_once($phphtmlib."/includes.inc");
//Those 2 lines take over 1 second
?>
Expected result:
----------------
expected the simple include script to return in under .1 ms
Actual result:
--------------
The script took over 1 second to execute.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27215&edit=1