|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-02-10 20:19 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 03:00:01 2025 UTC |
ok with further testing, I have trimmed my configure line down to the following. ./configure \ -with-apxs=/usr/local/apache/bin/apxs I then restart apache. First hit to the test script .097 s Second hit .187 s third .264 s .332 s .346 s .392 s (peaked out here) In each test, I wait a few seconds to make sure there is no load on the machine. I'm using a seperate machine to run the browser as to not polute the server response times. The entire php script. <?php $_time = explode(" ",microtime()); $start = $_time[1] + $_time[0]; $phphtmllib = "phphtmllib"; include_once( $phphtmllib."/includes.inc"); $_time = explode(" ", microtime()); $stop = $_time[1] + $_time[0]; $elapsed = substr($stop - $start, 0, 5); echo "<i>elapsed time: ".$elapsed." s </i><br>\n"; ?>