Web lists-archives.com

Re: Review Request 129186: [baloo] Speedup Positioncodec::encode()

This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/129186/

This change has been marked as submitted.

Review request for Baloo, KDE Frameworks and Vishesh Handa.
By Christian Ehrlicher.

Updated Nov. 7, 2016, 6:44 p.m.


Submitted with commit 2717080c46072b2a2998cb7d043a7cbcefa6a843 by Christian Ehrlicher to branch master.
Repository: baloo


This patch speeds up PostingCodec::encode() by a factor of ~4 by not adding every single encoded int32 to the resulting bytearray which results in a lot of small memcpy operations. The idea is to use a preallocated QByteArray and directly encode the integers into this buffer. This makes the code a little bit more complex but the speedup should be gain enough for this.

Ping! No interest in this patch? Should I discard it?


positoncodectest calculates the same md5sum as before.


  • src/codecs/coding.cpp (5961077)

View Diff