Comment 3 for bug 1531038

Revision history for this message
Michi Henning (michihenning) wrote :

Fixed. The backlog of 20 was too large, meaning that the UI could never cancel requests quickly enough to actually be still in the queue because, each time we dropped back to the event loop, we'd fire another request. That turned all the cancel messages effectively into no-ops.

I also changed the rate limiter to use LIFO instead of FIFO. This gives a cancel message a much better chance of still finding a request waiting in the queue, so it can really be cancelled. This massively improves the user experience with a cold cache when scrolling through a large collection of songs because the requests that become visible once scrolling stops are dealt with first. (Previously, the thumbnails for songs visible at the end of the scroll would appear only once all preceding thumbnails (now no longer visible) had been dealt with.)