[Interest] Improve ListView scrolling performance (many pictures)

Vlad Stelmahovsky vladstelmahovsky at gmail.com
Thu Aug 10 14:41:59 CEST 2017


threaded image provider might help

On Thu, Aug 10, 2017 at 12:36 PM, Bernhard B <schluchti at gmail.com> wrote:

> Hi,
>
> yesterday, I also tried to replace the Base64ImageProvider approach with a
> subclassed QQuickPaintedItem which paints the image in it's paint method. I
> imagined that this approach might be faster es no bade64 decoding needs to
> be done. But unfortunately it looks like as it's performing even worse that
> way.
>
> Bernhard
>
> Am Mittwoch, 9. August 2017 schrieb Bernhard B :
>
>> Hi,
>>
>> I would need some help from you guys on how to improve the ListView's
>> performance. The problem is, that scrolling through my ListView sometimes
>> feels a little bit sluggish.
>>
>> If I only display some text in the ListView's delegate I can scroll
>> smoothly through my list. But as soon as there is a picture in the
>> ListView's delegate I notice that I can't scroll smoothly through my list
>> anymore. That's especially noticable if I try to scroll fast through my
>> list. Every time I hit a picture while scrolling through the list I can see
>> that there is a noticable delay until the picture is fully loaded. My
>> assumption is, that those pictures are the reason why he scrolling feels so
>> sluggish.
>>
>> My application currently works like this:
>>
>> * load 20 pictures via REST (pictures are base64 encoded)
>> * populate list model
>> * the Image component in the delegate uses a Base64ImageProvider (self
>> written) to access the model's base64 encoded content and displays the image
>> * if the user scrolls past a threshold another batch of base64 encoded
>> pictures is fetched from the server
>>
>> I also found this document: http://doc.qt.io/qt-
>> 5/qtquick-performance.html#rendering and tried to apply as much as
>> possible. In detail I applied the following changes:
>>
>> * removed complex bindings from delegate
>> * set sourceSize property for Image
>> * increased cacheBuffer a bit
>> * profiled with QML profiler and improved a few things
>>
>> But still, the ListView feels a bit sluggish. The strange thing is, that
>> it's most noticable on Android whereas on Windows and iOs it is better.
>>
>> Does anyone have an idea on how to improve that?
>>
>>
>> Any help is really appreciated.
>> Thanks a lot!
>>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>


-- 
Best regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170810/41b17beb/attachment.html>


More information about the Interest mailing list