Deferred rendering calls not cancelled when scrolling fast in a list/grid

Bug #381007 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Moovida
Fix Released
Critical
Florian Boucault

Bug Description

This is more visible in plugins that do some calls to remote servers to render thumbnails for example.

Steps to reproduce (with the Flickr plugin):

1) Clear your cache directories (~/.moovida/flickr_cache and ~/.moovida/pictures_cache).
2) Start Moovida, go to Internet Media > Images > Flickr > Last 7 Days Interesting.
3) Wait for half of the grid to be rendered and scroll fast to the right.

Expected result: the thumbnails for the range of photos in the grid's window load correctly (and start loading straight away).

Current result: wrong thumbnails are displayed for some photos (proceeding from non cancelled requests for previous photos) and then are replaced by correct thumbnails.

Related branches

Olivier Tilloy (osomon)
Changed in elisa:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Florian Boucault (fboucault) wrote :

This is very likely due to a very improper use of _render_calls dictionary in pigment/widgets/list.py where different keys are used, sometimes the widget, sometimes the item.

Changed in elisa:
assignee: nobody → Kaleo (fboucault)
Revision history for this message
Florian Boucault (fboucault) wrote :

After experimentation, my last comment was wrong.

Changed in elisa:
assignee: Kaleo (fboucault) → nobody
Changed in elisa:
milestone: none → bug-fixing-day
assignee: nobody → Kaleo (fboucault)
Revision history for this message
Florian Boucault (fboucault) wrote :

The bug is not specific to the grid mode. It also happens in the vertical list mode.

Changed in elisa:
status: Confirmed → In Progress
Revision history for this message
Florian Boucault (fboucault) wrote :

The explanation is in fact pretty straightforward: calls to get metadata (thumbnail, etc.) in poblesec.base.list are not cancelled.
Plan is to make node_renderer return a cancellable deferred that will be called at the appropriate time = a newly written cleaner function passed to the list widget.

Revision history for this message
Florian Boucault (fboucault) wrote :

My last comment is wrong. Some deferreds, notably the thumbnail retrieval one, are registered for later cancellation.

Revision history for this message
Florian Boucault (fboucault) wrote :

Merge request available:

https://www.moovida.com/quality/review/request/%<email address hidden>%3E

Changed in elisa:
status: In Progress → Fix Committed
Olivier Tilloy (osomon)
Changed in elisa:
milestone: bug-fixing-day → 1.0.8
Olivier Tilloy (osomon)
Changed in moovida:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.