From: Peter Hickman Date: 2013-06-03T05:59:58+09:00 Subject: Re: Ruby extremely slow compared to PHP --001a11c38e2c4b05f004de322172 Content-Type: text/plain; charset=ISO-8859-1 Well running the code against the example url the reason for the length of time it took was these files: 16700151 http://www.eluth.com/extras/update.php?read_me=0&readme_file=../../../../usr/local/apache2/logs/access_log 429251 http://www.eluth.com/extras/update.php?read_me=0&readme_file=../../../../usr/local/apache2/logs/error_log 17092095 http://www.eluth.com/extras/update.php?read_me=0&readme_file=../../../../var/log/httpd/access_log 586331 http://www.eluth.com/extras/update.php?read_me=0&readme_file=../../../../var/log/httpd/error_log Large files will necessarily take longer to download, all the rest were a little over 1K. Which puts the bottleneck on the code which gets the page (Net::HTTP.get) rather than the script overall. However without the PHP version of the program to compare it against there is no way to measure how much slower Ruby is against PHP. Is PHP really that much faster at downloading a web page? --001a11c38e2c4b05f004de322172 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Well running the code against the=A0example url the reason= for the length of time it took was these files:

16= 700151 http://www.eluth.com/extras/update.php?re= ad_me=3D0&readme_file=3D../../../../usr/local/apache2/logs/access_log
429251 http://www.eluth.com/extras/upd= ate.php?read_me=3D0&readme_file=3D../../../../usr/local/apache2/logs/er= ror_log
17092095 http://www.eluth.com/extras/update.ph= p?read_me=3D0&readme_file=3D../../../../var/log/httpd/access_log
586331 http://www.eluth.com/extras/update.php?r= ead_me=3D0&readme_file=3D../../../../var/log/httpd/error_log

Large files will necessarily take longer to= download, all the rest were a little over 1K. Which puts the bottleneck on= the code which gets the page (Net::HTTP.get) rather than the script overal= l.

However without the PHP version of the program to compa= re it against there is no way to measure how much slower Ruby is against PH= P. Is PHP really that much faster at downloading a web page?

--001a11c38e2c4b05f004de322172--