|
Re: extragear/graphics/kst/kst/datasources/ascii: msg#00249kde.kst
As I understand it the reserve method simply pre-allocates some space. This is really only useful if you know you're going to be building up a string a few characters at a time (resulting in many allocations). In this case we are reading a line of text and so only one allocation should be made, so we gain nothing by doing the reserve (except another call and most likely using more space than we actually need). -----Original Message----- From: George Staikos [mailto:staikos@xxxxxxx] Sent: Monday, July 25, 2005 11:03 AM To: kst@xxxxxxx Subject: Re: [Kst] extragear/graphics/kst/kst/datasources/ascii On Friday 22 July 2005 17:59, Andrew Walker wrote: > -#if QT_VERSION >= 0x030200 > - ignore.reserve(1001); > -#endif Why was this call removed? The profiler told me that we were mallocing when we could guess that we didn't need to, and this helped. I know that there is a chance of concatenations with the new code, but I think that's a corner case, and even then, this won't hurt it. -- George Staikos KDE Developer http://www.kde.org/ Staikos Computing Services Inc. http://www.staikos.net/ _______________________________________________ Kst mailing list Kst@xxxxxxx https://mail.kde.org/mailman/listinfo/kst |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | BENACHRICHTIGUNG ZUR MAIL ZUSTELLUNG: 00249, Mailer-Daemon |
|---|---|
| Next by Date: | Re: kst and FC4 x86_64: 00249, George Staikos |
| Previous by Thread: | Re: extragear/graphics/kst/kst/datasources/asciii: 00249, George Staikos |
| Next by Thread: | [Bug 108027] New view objects for annotating and drawing: 00249, Nicolas Brisset |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |