XAMPP and slow PHP performance
Posted: 28. November 2010 20:15
I just updated to the most recent XAMPP and ran my php web crawler for fun to test out the new performance. However, when I the script proceeded past 300 websites it started to take 5 seconds to load a url... then 10 seconds... 50 seconds until I stopped it. I'm using CURL and it is set to go to the next url after 1 second if there is no response instantly.
At first I thought the performance slowed because of my AJAX but this was not the case. Next, I modified my script to remove large arrays and set the buffer to autoflush.
I parsed some AJAX into my localhost page to see results in real time and it looks like the performance starts high and then drops to a crawl. What could cause this in PHP? Could I modify a .ini or apache setting? Any suggestions or other things you think I should try or know?
- Code: Select all
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 1);
At first I thought the performance slowed because of my AJAX but this was not the case. Next, I modified my script to remove large arrays and set the buffer to autoflush.
I parsed some AJAX into my localhost page to see results in real time and it looks like the performance starts high and then drops to a crawl. What could cause this in PHP? Could I modify a .ini or apache setting? Any suggestions or other things you think I should try or know?