From: [EMAIL PROTECTED] Operating system: win_xp PHP version: 4.2.3 PHP Bug Type: *Directory/Filesystem functions Bug description: file() function extremally slow
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 bug report at http://bugs.php.net/?id=19971&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19971&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19971&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19971&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19971&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19971&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19971&r=support Expected behavior: http://bugs.php.net/fix.php?id=19971&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19971&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19971&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19971&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19971&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19971&r=dst IIS Stability: http://bugs.php.net/fix.php?id=19971&r=isapi