Req #76599 [NEW]: php_strip_whitespace() is too slow
| From: | maggus dot staab+php at googlemail dot com | Date: | Mon, 09 Jul 2018 15:05:20 +0000 |
| Subject: | Req #76599 [NEW]: php_strip_whitespace() is too slow | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-216243@lists.php.net to get a copy of this message | ||
From: maggus dot staab+php at googlemail dot com
Operating system: win
PHP version: 7.2.7
Package: Performance problem
Bug Type: Feature/Change Request
Bug description:php_strip_whitespace() is too slow
Description:
------------
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?
https://blackfire.io/profiles/04234c24-b8c4-43b0-b23a-0a836b8c766e/graph
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"
Expected result:
----------------
issue "blackfire run composer install" in your projects directory to get
something like
https://blackfire.io/profiles/04234c24-b8c4-43b0-b23a-0a836b8c766e/graph
--
Edit bug report at https://bugs.php.net/bug.php?id=76599&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76599&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76599&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76599&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76599&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76599&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76599&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76599&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76599&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76599&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76599&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76599&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76599&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76599&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76599&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76599&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76599&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76599&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76599&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76599&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76599&r=mysqlcfg