From kmail-devel Mon Feb 12 21:36:59 2007 From: David Faure Date: Mon, 12 Feb 2007 21:36:59 +0000 To: kmail-devel Subject: Re: QCString construction Message-Id: <200702122237.12193.dfaure () klaralvdalens-datakonsult ! se> X-MARC-Message: https://marc.info/?l=kmail-devel&m=117131624405870 On Monday 12 February 2007, Ingo Klöcker wrote: > I think it should be > +  memcpy( cstr.data(), str.data(), strLen ); Oh wow, well spotted. Yes. Initially it was using c_str(), and then I found some code doing the above and realized it was a bit faster (c_str() can make a full copy if it lacks room for the trailing 0 it seems). > Ideally, we'd probably change all usage of QCString to DwString. Yes. QCString sucks so much for large strings, and we store the data as DwString in the first place. But it doesn't look like we can do everything with DwString. > But I'm not sure whether it's worth putting much effort into this since for KDE > 4.x we'll probably use QByteArray (with KMime instead of mimelib) > everywhere. That's right. Well, my efforts are financed (kolab issue 1222) but I guess I have to stop soon on that effort indeed. But even though I improved the runtime performance, the memory usage is still huge... -- David Faure, faure@kde.org, dfaure@klaralvdalens-datakonsult.se KDE/KOffice developer, Qt consultancy projects Klarälvdalens Datakonsult AB, Platform-independent software solutions _______________________________________________ KMail developers mailing list KMail-devel@kde.org https://mail.kde.org/mailman/listinfo/kmail-devel