Last active
August 29, 2015 13:59
-
-
Save pgodel/10742902 to your computer and use it in GitHub Desktop.
test to install symfony deps using PHP and HHVM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Instructions | |
# run: php composer.phar create-project symfony/framework-standard-edition test 2.4.3 --no-scripts | |
# cd test and download and run this script | |
if [ ! -f composer.phar ]; then | |
curl -sS https://getcomposer.org/installer | php | |
fi | |
echo Deleting vendor... | |
rm -rf vendor | |
echo PHP test | |
time php composer.phar install --prefer-dist --no-scripts | |
echo Deleting vendor... | |
rm -rf vendor | |
echo HHVM test | |
time hhvm composer.phar install --prefer-dist --no-scripts |
@stof adding --dry-run clearly shows a major improvement in execution time, but why would I do that? Nobody will run composer with --dry-run. I want to test a real use case, not a theoretic one.
Hack vs PHP (Computer Language Benchmarks Game):
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, we agree that running composer install with HHVM results in slower execution than PHP. I understand the issue with the JIT cache on CLI. But in my tests, HHVM takes longer than PHP, much longer than the JIT initialization. In the best case scenario, HHVM should be the same or roughly the same speed as PHP, not many seconds slower. The bigger the number of deps, the larger the gap is.
My point is, lots of people recommend to run composer with HHVM which is fine if you are using it for doing the update. But if you are using it for install then it will run slower. So doing the aliasing to always run composer with HHVM is not a good idea at the moment, until the HHVM team improves the performance around whatever composer install is doing.