[Interest] Faster QXmlStreamWriter?

Vadim Peretokin vperetokin at gmail.com
Sun Apr 22 16:30:29 CEST 2018


I'm looking at optimizing an applications save performance - it is too slow
right now and causes too much of a freeze. We're using QXmlStreamWriter,
here's the implementation
<https://github.com/Mudlet/Mudlet/blob/development/src/XMLexport.cpp>.

Profiling suggests that Qt's write element / attribute method is too slow (
screenshot <https://imgur.com/a/UUVSp4I>, results attached). Is there
anything I can do it speed it up? I tried giving it a QBuffer instead of a
QFile, but the difference was marginal.

A lot of time seems to be spent resizing the buffer, and unfortunately
there doesn't seem to be a way to pre-set the QBuffer size to something
reasonable to begin with.

Anyone have tips?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180422/84a62f81/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: result.csv
Type: text/csv
Size: 5188 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180422/84a62f81/attachment.csv>


More information about the Interest mailing list