Page MenuHome GnuPG

Kleopatra, performance: Use icons as a resource
Open, WishlistPublic

Description

QIcon::fromTheme is very slow on Windows as it looks in multiple locations for icons (of different sizes). This can be sped up by using binary resources for the icons.

This is already implemented in KDE: https://github.com/KDE/kiconthemes/blob/master/src/kicontheme.cpp#L48

This would also simplify and speed up the breeze icon theme installation.

Details

Version
master

Revisions and Commits

Event Timeline

Problems here are:

  • The icon theme needs a build tool to generate which is a problem with CMake Crosscompiling.
  • Building natively and then packaging the icontheme.rcc would work
    • The breeze-icons.rcc must be renamed to icontheme.rcc and copied to <instdir>\bin\data
    • index.theme must be in the same place.
  • The GpgOLGui would not find icons from that because it would need to link to kicontheme.
  • The Kleopatra icon in breeze would need to be patched out as we want to use the old icon for kleopatra.

The issue with rWe06c325a9a29 was that it linked in all breeze icons and nowadays would also link in all breeze-dark icons. Which increased the size of Kleopatra so much that there was no performance gain and the fallbacks were still checked. This might require a fix in Qt / Kiconloader not to use fallbacks and also to only resource up the subset of icons which we actually use and package.