[Qt-qml] Performance issue with Repeater

Juha Turunen turunen at iki.fi
Sun Sep 19 23:37:15 CEST 2010


How about using a ListView instead of Flickable? This way everything
doesn't have to be instantiated at once, but instead ListView smartly
creates (and disposes) instances of the delegate component as the user
scrolls the view.

Juha

On Mon, Sep 20, 2010 at 12:19 AM, Sohail Somani <sohail at taggedtype.net> wrote:
> Hi,
>
> I have a need to create a bunch of rectangles with different heights in a
> single column.
>
> Essentially it's like a scrollable bar chart but with a large number of
> entries.
>
> The self-contained code I'm using to create this bar chart is attached.
>
> The problem seems to be that when I get to a normal number of elements
> (approx 3000), the initial display performance is incredibly slow. I think I
> understand why: there are a lot of rectangles that need to be created.
>
> One option I thought of is to remove all the rectangles that display units
> less than a certain amount but this roughly amounts to having less elements
> and loses precision. Worst case, I can expect about 60,000 although it is
> quite literally impossible for any particular user. In my testing, 3000 is
> about normal so I'd like to be able to handle at most 3-4x that amount if
> possible.
>
> So any techniques you can recommend for faster display for the attached?
> Delayed loading perhaps?
>
> Thanks in advance!
>
> Sohail
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>
>



More information about the Qt-qml mailing list