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




src/kicontheme.cpp (line 675)
<https://git.reviewboard.kde.org/r/127236/#comment63406>

    This looks like it causes a lot of transient allocations, creating a QList 
just to do a contains() on it. Or is this list kept/cached by QFile?


- Kai Uwe Broulik


On März 1, 2016, 3:25 vorm., Aleix Pol Gonzalez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127236/
> -----------------------------------------------------------
> 
> (Updated März 1, 2016, 3:25 vorm.)
> 
> 
> Review request for KDE Frameworks and Christoph Feck.
> 
> 
> Repository: kiconthemes
> 
> 
> Description
> -------
> 
> At the moment we're playing Battleship to see if an icon is present in a 
> subdirectory. This means that we are checking on every directory if there's 
> an icon that matches the size with a said name on every request.
> 
> This can be seen easily with strace:
> ```
> $ strace kwrite |& grep ENOENT | wc -l
> 6212
> ```
> After the patch: 
> ```
> $ strace kwrite |& grep ENOENT | wc -l
> 1993
> ```
> We reduce these accesses to let QDir keep the list of files inside the 
> directory (that was already being generated at some point, it just was being 
> discarded).
> 
> 
> Diffs
> -----
> 
>   src/kicontheme.cpp 0996054 
> 
> Diff: https://git.reviewboard.kde.org/r/127236/diff/
> 
> 
> Testing
> -------
> 
> Builds, tests still pass, applications start noticeably faster.
> 
> 
> Thanks,
> 
> Aleix Pol Gonzalez
> 
>

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to