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/

Review request for Baloo.
By Christian Ehrlicher.

Updated Okt. 17, 2016, 5:30 vorm.

Changes

Postingcode -> Positioncodec :)

Summary (updated)

[baloo] Speedup Positioncodec::encode() 
Repository: baloo

Description

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.

Testing

positoncodectest calculates the same md5sum as before.

Diffs

  • src/codecs/coding.cpp (5961077)

View Diff