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

Qt6 loads all imageformat plugins during startup

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.9.0 FF
    • 6.9
    • Image formats
    • None
    • All
    • 74487c313 (dev)

    Description

      We are debugging where is biggest memory consumers in Qt6 Qml applications. One of the contributor is imageformat plugins, which are all loaded during startup application startup. Even when they are not used at all.

      I used hellocube as an example. It uses png image in rotating cube. And on eglfs platform all qml applications has png image as a cursor (cursor-atlas.png)

       

      I found out that attached patch will help. It will also describe the problem with png images:

      1. Image format plugin is tried to load. First it checks that is there any plugins that have it supported in metadata -> No plugin found
      2. Second it loads and checks capabilities for all plugins. This is the problematic step. -> No plugin found
      3. Thirdly it loads png "plugin" which is internal/compiled into QtGui

      Patch reverses steps two and three. Other option would be to convert png plugin into official imageformat plugin.

      Image formats team, please check this. Memory consumption will grow bigger and bigger, more image formats we will have. This will have impact also into application startup time.

       

      Attachments

        1. qimagereader.cpp.diff
          5 kB
          Jari Helaakoski
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            jarihelaakoski Jari Helaakoski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes