GNOME Bugzilla – Bug 393912
"Cache Article" processes selected articles in "random" order
Last modified: 2007-01-12 15:02:03 UTC
Please describe the problem: If you select a range of articles in the header pane and choose "Cache Article", the articles will be downloaded and cached in an effectively random order instead of first-to-last (or even last-to-first - "old pan" used to obey the "selection order"). If you (like I do) use "Cache Article" as a workaround for Pan's lack of read-ahead (i.e. select and cache a range of articles that you know that you will read, so as to not have to wait for the download when going to the next article), this behaviour is extremely annoying. Steps to reproduce: 1. Select a range of articles in the header pane 2. Choose "Cache Article". 3. Watch the download/cache progress. Actual results: See above. Expected results: The articles should be processed in order. Does this happen every time? Yes. Other information: Hm, I have a patch, but don't see anywhere to attach it in this form...
Created attachment 79637 [details] [review] Patch
Unfortunately that patch didn't reliably do caching in "header pane order" - I guess the default is to add tasks to the queue in age-sorted order, which just happened to work on my test cases. The attached (incremental) patch fixes this - adding them to the top is a "policy decision" , but I think it's the right one.
Created attachment 79721 [details] [review] Patch on top of the previous one
Created attachment 79769 [details] [review] sort articles by date before adding them to queue How does this patch look to you?
Uh, I'm afraid it doesn't look good at all to me. The idea is that the articles should be processed in the order they're shown in the header pane - that's what old-pan did, that's what is needed for my usage (simulated read-ahead - i.e. read the cached articles in the order you normally would while downloading/caching happens "ahead"), and I'd say that it's the POLA behaviour. At least for me, date- sorted has zero advantage over the previous random order. I do believe my two patches combined achieved this (I could be wrong though), and since your patch effectively incorporates those as far as I can see, and then adds the date-sorting on top of that, I don't really see the motivation for it...
Fair enough, as long as gtk_tree_view_get_selection always returns articles in the same order they're shown in the header pane. I guess that's a safe bet.