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 <t...@rightsoft.com.au> To: interest@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.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest