Rendering images on Android using QML image type performance issues
-
wrote on 10 Jul 2014, 11:33 last edited by
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.PreserveAspectCropColumn { 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" ); } } }
}@
-
wrote on 10 Jul 2014, 16:28 last edited by
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/2