JakubOnderka / PHP-Parallel-Lint

This tool check syntax of PHP files faster than serial check with fancier output.
Other
647 stars 62 forks source link

Significantly slower under HHVM #47

Closed legoktm closed 9 years ago

legoktm commented 9 years ago

Hi! First off, your tool is fantastic, we've started switching over our CI jobs to use it.

I've noticed that running it under HHVM is significantly slower than using PHP5. For example, when checking the "includes" directory of MediaWiki:

$ vendor/bin/parallel-lint includes -p hhvm
PHP 5.6.99 | HHVM 3.3.1 | 10 parallel jobs
............................................................  60/829 (7 %)
............................................................ 120/829 (14 %)
............................................................ 180/829 (21 %)
............................................................ 240/829 (28 %)
............................................................ 300/829 (36 %)
............................................................ 360/829 (43 %)
............................................................ 420/829 (50 %)
............................................................ 480/829 (57 %)
............................................................ 540/829 (65 %)
............................................................ 600/829 (72 %)
............................................................ 660/829 (79 %)
............................................................ 720/829 (86 %)
............................................................ 780/829 (94 %)
.................................................            829/829 (100 %)

Checked 829 files in 55.7 seconds, no syntax error found

versus

$ vendor/bin/parallel-lint includes -p php5
PHP 5.5.9 | 10 parallel jobs
............................................................  60/829 (7 %)
............................................................ 120/829 (14 %)
............................................................ 180/829 (21 %)
............................................................ 240/829 (28 %)
............................................................ 300/829 (36 %)
............................................................ 360/829 (43 %)
............................................................ 420/829 (50 %)
............................................................ 480/829 (57 %)
............................................................ 540/829 (65 %)
............................................................ 600/829 (72 %)
............................................................ 660/829 (79 %)
............................................................ 720/829 (86 %)
............................................................ 780/829 (94 %)
.................................................            829/829 (100 %)

Checked 829 files in 8.2 seconds, no syntax error found
JakubOnderka commented 9 years ago

Thanks for your report, but this problem is caused by slow lint in hhvm and I can't do anything with that.

HHVM 3.5.1:

$ time php -l src/ParallelLint.php 
No syntax errors detected in src/ParallelLint.php

real    0m0.181s
user    0m0.132s
sys 0m0.048s

PHP 5.6:

$ time php -l src/ParallelLint.php 
No syntax errors detected in src/ParallelLint.php

real    0m0.032s
user    0m0.018s
sys 0m0.010s