OK, hang on. I may have found a mistake and what I described may not actually have been happening.
On Wed, Jan 28, 2015 at 3:13 PM, Robert Krüger <krue...@lesspain.de> wrote: > > Hi, > > On Wed, Jan 28, 2015 at 1:59 PM, Werner Lehmann < > lehm...@media-interactive.de> wrote: > >> Robert, >> >> I think Tomas is right, load your thumbnails on demand when updateItem is >> called for an item with missing thumbnail. You say that the cell of a >> visible item gets reused for another item. If that is the case I guess that >> the item is "moved" to another cell. Wouldn't it be possible to have an >> image property on your items and the lazy loading is done on the item, >> triggered when the item is passed to updateItem of any cell? That > > > That is exactly what I have implemented but the problem is as described > above > - Too many non-visible images are loaded (I could probably live with that > for a while) > - I have yet to find a criterion to decide an image is no longer needed > and thus its loading job needs to be removed from the job stack (see below) > > >> should trigger the demand-loading and it would be robust against the >> tableview exchanging cells for individual items. >> > As to the question when to start or stop lazy loading for items, I would >> add the load-demands to a stack. Each time the image for a new item is >> requested it is put to the top of the stack and you have one or more >> threads processing items on the stack (LIFO). An an image is requested >> which is already on the stack move it to the top of the stack. If an item >> is removed from a cell remove it from the stack. That should do it. >> >> > That's what I am doing already. > > Regards, > > Robert > > Werner >> >> On 28.01.2015 09:30, Robert Krüger wrote: >> >>> Doesn't help. The patterns of this property being changed are just as >>> unusable for my purposes as with the other approaches (e.g. I can clearly >>> see that item is set to a different value for a cell that is still >>> visible, >>> >> ... >> >> > > > -- > Robert Krüger > Managing Partner > Lesspain GmbH & Co. KG > > www.lesspain-software.com > -- Robert Krüger Managing Partner Lesspain GmbH & Co. KG www.lesspain-software.com