#19971 [Opn->Bgs]: file() function extremally slow
| From: | mfischer@php.net | Date: | Fri, 18 Oct 2002 08:04:44 +0000 |
| Subject: | #19971 [Opn->Bgs]: file() function extremally slow | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22740@lists.php.net to get a copy of this message | ||
ID: 19971
Updated by: mfischer@php.net
Reported By: sazonenkov@yandex.ru
-Status: Open
+Status: Bogus
Bug Type: *Directory/Filesystem functions
Operating System: win_xp
PHP Version: 4.2.3
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Previous Comments:
------------------------------------------------------------------------
[2002-10-18 02:48:08] sazonenkov@yandex.ru
This function is extrimally slow read a file.
On php4.0.4pl1 it much faster (about 100-1000x)!!!
:(
<?php
require("Benchmark/Timer.php");
$time = new Benchmark_Timer;
$time -> setMarker('Start');
$fp = fopen("Photoshop.exe", "r");
//$s = explode("\n", fread($fp, filesize("Photoshop.exe") ) ) ;
fclose($fp);
//print_r($s);
$time -> setMarker('fread');
$s = file("Photoshop.exe");
$time -> setMarker('file');
$time -> setMarker('Stop');
$time -> display();
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19971&edit=1