Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.7

Bug #21080 MBString functions are extremally slow
Submitted: 2016-06-14 11:52 UTC
From: alec Assigned:
Status: Wont fix Package: Crypt_GPG (version 1.4.1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 48 - 37 = ?

 [2016-06-14 11:52 UTC] alec (Aleksander Machniak)
Description: ------------ I found that mb_substr/mb_strlen functions used to parse input/output are 5 times slower than subst/strlen. I tested with 60MB file (after fixing performance according to #21077). Current code encrypts a file in 56 seconds, but if I use old version of ByteUtils.php (the one that detected mbstring.func_overload and used no mb_* functions when not needed) it takes only 13 seconds. I propose to revert this change and use old method with mbstring.func_overload detection.


 [2016-06-14 11:57 UTC] alec (Aleksander Machniak)
What's more, for some reason mbstring-based code uses 250MB memory, while the other needs only 188MB of memory peak usage. Tested with PHP7.
 [2016-06-15 11:23 UTC] alec (Aleksander Machniak)
-Status: Open +Status: Bogus
Thank you for taking the time to write to us, but this is not a bug. After fixes from #21081 this is not an issue anymore. I decided to keep the current code.
 [2016-06-17 17:05 UTC] alec (Aleksander Machniak)
-Status: Bogus +Status: Wont fix -Roadmap Versions: 1.4.2 +Roadmap Versions: