iRail / stations

A list of all the Belgian stations and their properties used within the iRail project
http://irail.be/stations/NMBS
29 stars 20 forks source link

PHP package needs to speed up #88

Closed pietercolpaert closed 6 years ago

pietercolpaert commented 8 years ago

Right now, our script runs really slow... I'm sure that using a couple of techniques, we could make this code way more efficient. A couple of options I'm thinking about:

Bertware commented 7 years ago

@pietercolpaert testing on my system has shown php7 achieved 19x faster responses compared to php5.6 without APC (for APC, see #111 and #112). With APC, there was a 12x performance gain by using php7. Can you try this as well? If you or anyone else experience the same speed improvement, we should consider switching to php7.

See these results, for php5 and php7, each with apc enabled/disabled. Testing method from #111 .

Using both PHP7 and APC would result in a 2000x performance gain. I guess that's enough for you? ;)

php5 ~/.composer/vendor/bin/phpunit
Testing 100 liveboards took an average of 1747.603430748 ms for 1 liveboard, with APC disabled.

php5 -d apc.enable_cli=1 ~/.composer/vendor/bin/phpunit 
Testing 100 liveboards took an average of 10.28352022171 ms for 1 liveboard, with APC enabled.

php7 ~/.composer/vendor/bin/phpunit 
Testing 100 liveboards took an average of 92.941551208496 ms for 1 liveboard, with APC disabled.

php7 -d apc.enable_cli=1 ~/.composer/vendor/bin/phpunit 
Testing 100 liveboards took an average of 0.79075813293457 ms for 1 liveboard, with APC enabled.