Re: #19771 - patch

From: Date: Fri, 18 Oct 2002 13:47:31 +0000
Subject: Re: #19771 - patch
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-89720@lists.php.net to get a copy of this message
Tal Peer wrote:
hello, this patch tries to fix the performance issues described in bug #19771. i cannot benchmark this at the moment, so if anyone can, please do. the patch is available at http://tal.madcode.org/file.c.patch and thanks to wez :)
It's not related to file(), but I found another problem. Sorry, I don't have time look into. [yohgaki@dev DEV]$ ./sapi/cli/php t.php -------------------------------------------------------------
marker    time index            ex time               perct
-------------------------------------------------------------
Start     1034948606.60534400   -                       0.00%
-------------------------------------------------------------
Stop      1034948607.94562700   1.3402829170227       100.00%
-------------------------------------------------------------
total     -                     1.3402829170227       100.00%
------------------------------------------------------------- /home/yohgaki/cvs/php.net/DEV/Zend/zend_hash.c(406) : Freeing 0x08E84D74 (35 bytes), script=t.php Last leak repeated 47438 times /home/yohgaki/cvs/php.net/DEV/Zend/zend_API.c(846) : Freeing 0x08E84D3C (1 bytes), script=t.php Last leak repeated 47438 times /home/yohgaki/cvs/php.net/DEV/Zend/zend_API.c(845) : Freeing 0x08E84CFC (12 bytes), script=t.php Last leak repeated 47438 times /home/yohgaki/cvs/php.net/DEV/Zend/zend_hash.c(440) : Freeing 0x08E3E5EC (32768 bytes), script=t.php Last leak repeated 8 times /home/yohgaki/cvs/php.net/DEV/ext/standard/string.c(796) : Freeing 0x08AED524 (44 bytes), script=t.php /home/yohgaki/cvs/php.net/DEV/Zend/zend_API.c(565) : Actual location (location was relayed) Last leak repeated 8 times [yohgaki@dev DEV]$ cat t.php <?php $filename = 'libtool'; require("Benchmark/Timer.php"); $time = new Benchmark_Timer; $time -> setMarker('Start'); $s = ''; for ($i = 0; $i<10; $i++) { $fp = fopen($filename,'r'); while (!feof($fp))
     $s .= fgets($fp);
$s = explode("\n", $s); fclose($fp); } $time -> setMarker('Stop'); $time -> display(); ?> [yohgaki@dev DEV]$

« previous php.dev (#89720) next »