Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Rendering images on Android using QML image type performance issues

Rendering images on Android using QML image type performance issues

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sedonk
    wrote on 10 Jul 2014, 11:33 last edited by
    #1

    Rendering images with QtQuick 2.0 is very slow! About 40 seconds for a full hd png image.

    There is no difference in performance whether the image comes from a remote server or from the assets folder.

    gsm: Sony Xperia Z

    @Image {
    anchors.fill : parent
    source : ShopSettings.builtin_shoplist_backgroundimage
    fillMode : Image.PreserveAspectCrop

    Column {
        anchors.fill : parent
    
        Loader {
            id :header
            width : parent.width
            source : Shop.getQml( "ShopListHeader.qml")
        }
    
        ListView {
            id : shopList
            height : parent.height - header.height
            width : parent.width
            model : Shop.visitedShops();
            delegate : Loader {
                id : shopListEntry
                width : parent.width
                source : Shop.getQml( "ShopListElement.qml" );
            }
        }
    }
    

    }@

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cosmam
      wrote on 10 Jul 2014, 16:28 last edited by
      #2

      Have you tried using the "sourceSize":http://qt-project.org/doc/qt-5/qml-qtquick-image.html#sourceSize-prop property of the QML image element?

      If I'm remembering what I've done correctly, and I'm reading the documentation right, it should improve things by not loading the image at full resolution (which could be huge!), but at a scaled down resolution.

      Compiling it in to the resources file, rather than loading it remotely or from disk, should also help quite a bit. If I recall correctly, disk I/O on Android in cases like this is really slow, but a compiled-in resource is fast (this usually comes up with reading/loading the qml files themselves, but could be applicable here).

      1 Reply Last reply
      0

      1/2

      10 Jul 2014, 11:33

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved