After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 393912 - "Cache Article" processes selected articles in "random" order
"Cache Article" processes selected articles in "random" order
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other All
: Normal enhancement
: 1.0
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2007-01-07 14:51 UTC by Per Hedeland
Modified: 2007-01-12 15:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (828 bytes, patch)
2007-01-07 14:53 UTC, Per Hedeland
committed Details | Review
Patch on top of the previous one (384 bytes, patch)
2007-01-08 08:15 UTC, Per Hedeland
committed Details | Review
sort articles by date before adding them to queue (1.65 KB, patch)
2007-01-08 17:59 UTC, Charles Kerr
none Details | Review

Description Per Hedeland 2007-01-07 14:51:34 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...
Comment 1 Per Hedeland 2007-01-07 14:53:44 UTC
Created attachment 79637 [details] [review]
Patch
Comment 2 Per Hedeland 2007-01-08 08:14:18 UTC
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.
Comment 3 Per Hedeland 2007-01-08 08:15:00 UTC
Created attachment 79721 [details] [review]
Patch on top of the previous one
Comment 4 Charles Kerr 2007-01-08 17:59:35 UTC
Created attachment 79769 [details] [review]
sort articles by date before adding them to queue

How does this patch look to you?
Comment 5 Per Hedeland 2007-01-08 20:22:52 UTC
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...


Comment 6 Charles Kerr 2007-01-08 20:28:16 UTC
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.