This leads me to 3 patches.
One for kmail, I wrote a utility function for creating a
QCString from char*+size, and used that
when creating a QCString from a DwString where it matters
(i.e. where I found pretty large strings
to be used when attaching large files).
Can a kmail developer review the change to
KMMessage::asString() and asSendableString(), too?
It avoids a asString() (Assemble) and a fromString (Parse),
but I hope it's doing the right thing.
One for Qt itself: why does QCString use the slow way when
duplicating QCStrings?
(I know that QCString tmp( s1 ); is shallow copy, but the
next line calls operator+= which calls detach)
Unless someone spots a flaw in this patch I'll be posting it
to TT (and I'm testing my local kde with it
starting from tomorrow ;)
And one for mimelib, not really related to QCString: am I
right that memcpy is faster than for (i=0; i < pos1; ++i)
*to++ = *from++; ?
At least in gdb it seems faster, but I didn't benchmark it.
Hopefully memcpy is done by a single CPU instruction or
something, right?
Finally, I wish we could avoid the data copying just to
null-terminate it in KMMessagePart::body(), but I'm not sure
how...
--
David Faure, faure kde.org, dfaure klaralvdalens-datakonsult.se
KDE/KOffice developer, Qt consultancy projects
Klarälvdalens Datakonsult AB, Platform-independent software
solutions
_______________________________________________
Kde-optimize mailing list
Kde-optimize kde.org
ht
tps://mail.kde.org/mailman/listinfo/kde-optimize
|