Ticket #9135 (closed optimization: fixed)
wxString::Replace() very slow
|Reported by:||hildensia||Owned by:|
|Keywords:||Cc:||hildensia, vaclavslavik, kcwu@…|
When you do a global replace on very large Strings with a lot of replacements (>10000 and so on) wxString::Replace() gets really slow. (> 20 s)
The problem is, that the string is copied every time a replacement is done, because of the use of wxStringImpl::replace().
I've rewritten wxString::Replace() to copy the string only once. It results in a ca. five times faster Replace().