[Interest] Faster QXmlStreamWriter?

Vadim Peretokin vperetokin at gmail.com
Mon Apr 23 07:15:48 CEST 2018


Thanks! That helped remove the resize operation from the profiling data,
but QBuffer::writeData is still there, and the overall time didn't change
much.

Is there anything else I can look at, or is this a dead end then - requires
a different serialization solution altogether (a lot of work)?

On Sun, Apr 22, 2018 at 4:53 PM Giuseppe D'Angelo <giuseppe.dangelo at kdab.com>
wrote:

> Il 22/04/2018 16:30, Vadim Peretokin ha scritto:
> > 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?
>
> Didn't check the actual code, but you can always resize a QBuffer
> internal bytearray:
>
> QBuffer b;
> b.buffer().resize(1234); // or reserve()
>
> HTH,
>
> --
> Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
> KDAB (France) S.A.S., a KDAB Group company
> Tel. France +33 (0)4 90 84 08 53 <+33%204%2090%2084%2008%2053>,
> http://www.kdab.com
> KDAB - The Qt, C++ and OpenGL Experts
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180423/6dd58513/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: with 500kb preallocated.csv
Type: text/csv
Size: 12876 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180423/6dd58513/attachment.csv>


More information about the Interest mailing list