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

Regression: Performance of BorderImage has significantly decreased

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.4.0 RC
    • 5.4.0 Beta
    • Quick: SceneGraph
    • None
    • 4d15f5287905a2d8e4f4aa44494d01ecc3bf0cac

    Description

      BorderImage is a great fit for image-based buttons, but with the new implementation this becomes problematic.

      The following example, along with the attached image, can be used to reproduce the issue:

      import QtQuick 2.0
      
      Item {
          width: 800; height: 800
          Grid {
              anchors.fill: parent
              columns: 8
      
              Repeater {
                  id: buttonRepeater
                  BorderImage {
                      width: 100
                      height: 50
      
                      border {
                          left: 15
                          right: 15
                          top: 15
                          bottom: 15
                      }
      
                      source: "button-border.png"
                  }
              }
          }
      
          MouseArea {
              anchors.fill: parent
              onClicked: buttonRepeater.model = 128
          }
      }
      

      With Qt 5.3, this produces the following output (on desktop):

         - compiling material: 0ms
         - AtlasTexture(30x31), uploaded in 0 ms
       - Gui Thread: window=0x88d0240, polish=0, lock=0, block/sync=7 -- animations=0
       - Breakdown of render time: preprocess=0, updates=0, binding=0, render=13, total=13
      Render Thread: window=0x88d0240, framedelta=1837, sync=0, first render=13, after final swap=0
      

      With Qt 5.4, this produces the following output (on desktop):

      qt.scenegraph.time.renderloop: Frame prepared with 'threaded' renderloop, polish=0, lock=0, blockedForSync=65, animations=0 - (on Gui thread) QQuickView(0x933b648)
      qt.scenegraph.time.compilation: shader compiled in 0ms
      qt.scenegraph.time.texture: atlastexture uploaded in: 0ms (15x15)
      qt.scenegraph.time.texture: atlastexture uploaded in: 0ms (1x15)
      qt.scenegraph.time.texture: atlastexture uploaded in: 0ms (15x15)
      qt.scenegraph.time.texture: atlastexture uploaded in: 0ms (15x1)
      qt.scenegraph.time.texture: atlastexture uploaded in: 0ms (1x1)
      qt.scenegraph.time.texture: atlastexture uploaded in: 0ms (15x1)
      qt.scenegraph.time.texture: atlastexture uploaded in: 0ms (15x15)
      qt.scenegraph.time.texture: atlastexture uploaded in: 0ms (1x15)
      qt.scenegraph.time.texture: atlastexture uploaded in: 0ms (15x15)
      ...above 9 uploads repeated 128 times....
      
      qt.scenegraph.time.compilation: shader compiled in 0ms
      qt.scenegraph.time.renderer: time in renderer: total=67ms, preprocess=0, updates=0, binding=0, rendering=66
      qt.scenegraph.time.renderloop: Frame rendered with 'threaded' renderloop in 132ms, sync=65, render=67, swap=0 - (on render thread)
      

      Attachments

        1. atlasdump.jpg
          atlasdump.jpg
          66 kB
        2. button-border.png
          button-border.png
          1 kB

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            mbrasser Michael Brasser
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: