On 19.09.2013 03:07, Jussi Pakkanen wrote: > Cancellability is really, really hard. Is it absolutely necessary? Would > a timeout value be sufficient?
Thing is, imagine scrolling quickly through a list of 200 items that don't have their images available locally. That will end up queueing 200 image requests, when only the last ones are actually interesting when the view settles. The queue should be a ~ LIFO (ideally with a few active workers), I imagine, to cater for the fact that you're usually interested most in the last ones that are requested. So, if we can't cancel, all of those requests would get queued up and will be acted upon later, when you don't even necessarily need them any more. One question is whether there even is the possibility of implementing cancellation in the image providers - I would assume the QImage returned from the provider would get destroyed when not needed any more, at which point you could tell the remote service to cancel that request. TBH it could really only mean skipping them in the queue and acting again on that queue onIdle (+onWiFi +onPower?, as Michal mentioned). Now it occurred to me - the queue should probably be unique, and promote older items on new requests for the same asset. How's that sound? -- Michał (Saviq) Sawicz <[email protected]> Canonical Services Ltd. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1224998 Title: Cache preview and thumbnail images To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1224998/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
