Review Request 129186: [baloo] Speedup Positioncodec::encode()
David Faure
faure at kde.org
Sun Nov 6 11:28:56 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129186/#review100638
-----------------------------------------------------------
src/codecs/coding.cpp (line 114)
<https://git.reviewboard.kde.org/r/129186/#comment67568>
static ?
src/codecs/coding.cpp (line 183)
<https://git.reviewboard.kde.org/r/129186/#comment67569>
I wonder why this loop isn't also used for the first item as well. With v = 0 initially, it would write n-v i.e. n, i.e. the first item, and code would be overall simpler (no first-item special case, which also means no empty-list special case, the for loop would just be skipped if values.isEmpty()).
- David Faure
On Nov. 5, 2016, 11:39 p.m., Christian Ehrlicher wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129186/
> -----------------------------------------------------------
>
> (Updated Nov. 5, 2016, 11:39 p.m.)
>
>
> Review request for Baloo, KDE Frameworks and Vishesh Handa.
>
>
> 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.
>
>
> Ping! No interest in this patch? Should I discard it?
>
>
> Diffs
> -----
>
> src/codecs/coding.cpp 5961077
>
> Diff: https://git.reviewboard.kde.org/r/129186/diff/
>
>
> Testing
> -------
>
> positoncodectest calculates the same md5sum as before.
>
>
> Thanks,
>
> Christian Ehrlicher
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161106/9060f1f6/attachment.html>
More information about the Kde-frameworks-devel
mailing list