Review Request 127380: More conservative approach to saving some disk accesses
David Faure
faure at kde.org
Sat Apr 9 09:40:55 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127380/#review94446
-----------------------------------------------------------
Fix it, then Ship it!
Only minor things left.
autotests/kiconloader_unittest.cpp (line 131)
<https://git.reviewboard.kde.org/r/127380/#comment64197>
coding style: spaces around "+"
autotests/kiconloader_unittest.cpp (line 475)
<https://git.reviewboard.kde.org/r/127380/#comment64196>
coding style: spaces around '=' and around '<'
(in both 'for' statements, and around '>=' in the if())
autotests/kiconloader_unittest.cpp (line 478)
<https://git.reviewboard.kde.org/r/127380/#comment64198>
This algorithm is potentially fragile, there could be no QCOMPARE happening at all if ts is never >= i. Of course that would be a bug in the test, not in KIconLoader, but still. Might be better (and easier to read) to separate the two things: finding the right value for ts, and then outside the loop, doing the QCOMPARE. If ts is initialized with -1, then the QCOMPARE will fail if ts is still -1 at this point, which is good.
- David Faure
On April 7, 2016, 1:18 a.m., Aleix Pol Gonzalez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127380/
> -----------------------------------------------------------
>
> (Updated April 7, 2016, 1:18 a.m.)
>
>
> Review request for KDE Frameworks, Antonio Larrosa Jimenez and Christoph Feck.
>
>
> Repository: kiconthemes
>
>
> Description
> -------
>
> My previous approach to KIconThemes felt like a dead end, I decided I'll take a more conservative approach. Here's a first step.
>
>
> Diffs
> -----
>
> autotests/CMakeLists.txt 61e81f6
> autotests/kiconloader_benchmark.cpp PRE-CREATION
> autotests/kiconloader_unittest.cpp 0e47cc8
> src/kiconloader.cpp 75ab482
> src/kicontheme.cpp 0996054
>
> Diff: https://git.reviewboard.kde.org/r/127380/diff/
>
>
> Testing
> -------
>
> Attempts to call `KIconThemeDir::iconPath` on the benchmark: 4318 after/5040 before= 17% less QFile::exists
>
>
> Thanks,
>
> Aleix Pol Gonzalez
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160409/e4c44170/attachment.html>
More information about the Kde-frameworks-devel
mailing list