go to bug id or search bugs for
in our composer workflows we see php_strip_whitespace() on the hotpath while running "composer update".
in case time allows, it would be cool if someone could check the C implementation for possible low hanging fruits?
nikic suggested that the function could be faster by not using a outputbuffer:
"Currently it uses output buffering. Replacing that with a direct write to string would be the most obvious improvement"
issue "blackfire run composer install" in your projects directory to get something like https://blackfire.io/profiles/04234c24-b8c4-43b0-b23a-0a836b8c766e/graph
Add a Patch
Add a Pull Request
I tried to remove the buffering, and did a [benchmark](https://gist.github.com/jhdxr/24c5b8017f3a80b22e2a23b7c01b6e70).
it has almost 30%+ improve on my CentOS. from about 0.650 to 0.400.
however, I cannot see any improvement on my Windows. the time remains about 0.600+.
I'm not sure if I should submit this patch, since I haven't cleaned up it yet.
thx for working on that problem.
Me as the reporter cannot help you to answer this questin.
Hopefully one of the php-src core developers can find some time to chim in.
thx again for your work!
@jhdxr: Yes, please submit a pull request. We can then try to figure out why the speedup is platform dependent and if it's possible to improve it.