Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-9850

Inefficient pixmap cache 'key' generation in QPixmapIconEngine::pixmap()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 4.6.2
    • Fix Version/s: 4.7.0
    • Component/s: Image formats
    • Labels:
    • Commits:
      ad6dafee9be288bcef6b2c4b318b234d2995abff

      Description

      QPixmapIconEngine::pixmap() uses the following code to generate a key for the pixmap cache:

          QString key = QLatin1String("$qt_icon_")
                        + QString::number(pm.cacheKey())
                        + QString::number(pe->mode)
                        + QString::number(QApplication::palette().cacheKey())
                        + QLatin1Char('_')
                        + QString::number(actualSize.width())
                        + QLatin1Char('_')
                        + QString::number(actualSize.height())
                        + QLatin1Char('_');
      

      This block of code costs around 50% of the time of the total function. It should be investigated if this can be done more effeciently perhaps using QPixmapCache::Key, or at least optimizing the usage of the string operations.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            vgt Eirik Aavitsland
            Reporter:
            jabarron Jason Barron
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes