6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/5/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#8627] Improve String::wordwrap() performance
*
Your Email Address
*
Spam protection
Enter the letters below:
. ..__. ..___..___ |\ || | | | [__ | \||__|\__| | |
Comment
> I isolated this problem down to the user of iconv_substr. It's > incredibly slow compared to mb_substr, and it gets called *a lot*. > > Here's a benchmark script: > http://pastebin.com/r63kUt22 > > On my mac, the difference is very much visible, but not terrible performance: > > iconv_substr: 0.014400005340576 > mb_substr: 0.00049901008605957 > substr: 3.7193298339844E-5 > > On 2 linux machines we tried, the numbers looked more like this: > > iconv_substr: 8.3735179901123 > mb_substr: 0.00039505958557129 > substr: 4.8160552978516E-5 > > Yes that's 8 seconds for iconv_substr, 0.0004 seconds for mbstring > and 0.00005 for the non-unicode aware function. > > So my fix is to change Horde_String::substr and prefer mbstring over iconv
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers