[Interest] memory fragmentation?

Jason H scorp1us at yahoo.com
Tue Aug 21 16:17:01 CEST 2012


Not true for really large XML. With the all-in-one approach, you have to have the entire document completed. This will create a long pause, and increase latency, and increase memory usage. It can be very easily justified that many to Utf* calls are justified because of latency in the I/O system means it happens "for free" while reducing the overall latency.

Would you prefer an image transcoding server that waited for an image to be completely uploaded and completed, or start receiving the conversion as soon as final blocks or scan lines were available?



________________________________
 From: Tony Rietwyk <tony at rightsoft.com.au>
To: interest at qt-project.org 
Sent: Monday, August 20, 2012 9:52 PM
Subject: Re: [Interest] memory fragmentation?
 

...
In the end I chose Qt 4.8.1  QXmlStreamWriter(QString *).   The QByteArray version seemed the logical choice - but since the API only uses QString, each call resulted in temporaries being allocated and disposed.  It seems QString is crying out for an appendLatin1(const char *, int len) that re-allocates the unicode array if necessary, and then does the latin1 conversion without creating a temporary.   Doing a single toUtf8 at the end is also better than calling it a million times.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120821/9ebb1fed/attachment.html>


More information about the Interest mailing list