|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-03-15 00:38 UTC] shawn at rumental dot com
I just upgraded from 4.2.2 to 4.3.1(zip) in win2k. apache - isapi I replaced the ini file with newer one. most scipts i have run fine if not faster. I have a couple scripts which call preg-replace()on 15 key pattern match/replace array, each array match occuring at most 10 times per line of a text file. testing with a foreach(5 lines). (parsing text files to reformat). These scripts take 10-20 x longer to execute on 4.3.1 i can switch back to 4.2.2 and execution time is back to normal(2 seconds). tried with new and old ini. no errors are reported other than max execution time when its not set high enough. futher debugging is possible upon request, I dont know how at this point. php_info() snapshots, ini's, code are available. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 16:00:01 2025 UTC |
EXAMPLE CODE ------------------------------------------- set_time_limit ('200'); # logfile is 4mb text file with 17370 LINES $file="test.log"; $times=10; $i=1; while($i <=$times){ $mt = explode(' ', microtime()); $script_start_time = $mt[0] + $mt[1]; file($file); $mt = explode(' ', microtime()); $script_end_time = $mt[0] + $mt[1]; $time[]=round($script_end_time - $script_start_time, 5); echo 'file loaded in ', round($script_end_time - $script_start_time, 5), ' seconds<br>'; $i++; } $average=array_sum($time)/$times; echo "average time - ".$average; --------------------------------------------------- RESULTS: USING 4.3.1 ------------ file loaded in 0.47855 seconds file loaded in 0.74892 seconds file loaded in 0.7595 seconds file loaded in 0.58205 seconds file loaded in 0.82617 seconds file loaded in 0.83293 seconds file loaded in 0.86725 seconds file loaded in 0.90333 seconds file loaded in 0.63803 seconds file loaded in 0.82538 seconds average time - 0.746211 LATEST STABLE -------------- file loaded in 16.18174 seconds file loaded in 16.88304 seconds file loaded in 16.68356 seconds file loaded in 16.49004 seconds file loaded in 16.42378 seconds file loaded in 16.5862 seconds file loaded in 16.80012 seconds file loaded in 16.13519 seconds file loaded in 25.35214 seconds file loaded in 32.71799 seconds average time - 19.02538 results are similar even with smaller files