[SailfishDevel] Delegate creation on demand
Hendrik Borghorst
hendrikborghorst at gmail.com
Sun Dec 15 20:03:29 UTC 2013
Hello,
the problem isn't my delegate. It is quite minimal.
The problem is I think a bug in QML Listview. It goes absolutly crazy if
it is invisible and starts making delegate for around 50% of all items.
This causes the memory to run full.
A workaround I added is
model: visible ? modelVar : null
which works quite nicely. I think this bug could be an upstream qt bug?
greetings
Am Sonntag, den 15.12.2013, 10:01 +0100 schrieb
christopher.lamb at thurweb.ch:
> Hi Hendrik
>
> Have you seen this? http://qt-project.org/wiki/Performance_tip_Lists
>
> The general advice is to keep the delegates is lightweight as
> possible, and to use Loaders for anything needed later (e.g. onClick)
>
> Chris
>
> Zitat von "Hendrik Borghorst" <hendrikborghorst at gmail.com>:
>
> > Hello folks,
> >
> > I've got a problem with long lists (~25000 elements). All delegates are
> > created at once which causes the memory usage to explode beyond the
> > devices capability.
> >
> > I already tried setting "cacheBuffer: 0" in SiliciaListView but it
> > doesn't change it.
> >
> > Is the something I'm doing wrong.
> >
> > You can see the actual page code here:
> >
> > https://github.com/djselbeck/smpc/blob/master/pages/CurrentPlaylistPage.qml
> >
> > Shouldn't the delegates be constructed on demand? It is weird because my
> > old n8 wasn't struggling with qml lists with this size.
> >
> > greetings and congrats on getting the devices to your customers (I'm
> > very pleased)
> >
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20131215/67d9a87c/attachment.pgp>
More information about the Devel
mailing list