This repository has been archived by the owner on May 19, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there!
My colleague informed me that building the phar file takes about 4 minutes. I couldn't believe this so I quickly looked into what the issue was. Blackfire told me 97% of all the time is needed at
Phar::addFromString()
. So I thought why not just write it all to a temporary directory, make it "lazy" and then add all of the files to the phar file at once usingPhar::buildFromDirectory()
.Turns out this works just fine for me and build time went down from 4 min 5 s to 7.05 s 😎
I couldn't add tests because the supported php versions and the used phpunit is so old that I sort of cannot get it to work without some serious changes. Do you plan to update the tests on master and update to a decent phpunit version? If so, I'll be happy to add tests for this stuff here.
Hope to help :-)
PS: Blackfire comparison: https://blackfire.io/profiles/compare/2d79d513-2460-4010-a797-914ba7237a7f/graph