[baloo] Speedup Positioncodec::encode()

Review Request #129186 - Created Oct. 14, 2016 and submitted

Information
Christian Ehrlicher
baloo
Reviewers
baloo, kdeframeworks
vhanda

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.

Issues

  • 1
  • 1
  • 1
  • 3
Description From Last Updated
static ? David Faure David Faure
Christian Ehrlicher
Christian Ehrlicher
Christian Ehrlicher
Christian Ehrlicher
Aleix Pol Gonzalez
Michael Stemle
David Faure
Christian Ehrlicher
Michael Stemle
David Faure
Christian Ehrlicher
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 2717080c46072b2a2998cb7d043a7cbcefa6a843 by Christian Ehrlicher to branch master.
Michael Stemle
Ship It!
Loading...