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().
Change History (8)
Changed 8 years ago by hildensia
Changed 8 years ago by kcwu
comment:3 Changed 8 years ago by kcwu
- Cc kcwu@… added
- Component set to base
- Status changed from closed to reopened
- Type set to optimization