Closed Bug 470447 Opened 16 years ago Closed 15 years ago

Auto-Sync improvement: Default folder strategy should give higher priority to the folders opened by the user

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.1b3

People

(Reporter: bugmil.ebirol, Assigned: bugmil.ebirol)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Rev 1 (obsolete) — Splinter Review
It looks a good strategy in general to give higher priority to the folders selected/opened by the user explicitly.
Attachment #353843 - Flags: superreview?(bienvenu)
Attachment #353843 - Flags: review?(bienvenu)
why does this not need to follow the pattern of the other checks (inbox/drafts, etc) and determine if aFolderA is open?
Well, simply I didn't think it is necessary to make prioritization among opened folders based on their types. Sounds like a good idea though. 

Do you suggest me to add this feature into the patch?
This is the alternative of the first one. It makes prioritization among  the opened folders by type.

I don't obsolete the first one since we make a final decision between these two strategies.
Sorry, it wasn't clear to me that the way your comparison routines were used, you didn't need to look at the properties of both folders (e.g., if it was a quick sort compare routine, you would need to look at both since you couldn't make any assumptions about which two folders were being compared in which order). Ordinarily, I would say that you wouldn't need to worry about the case of having multiple folders open in the UI, but I suspect we're going to want to expand this to include folders that are open in the ui by virtue of being part of a saved search that's open in the UI, which will make it much more likely that multiple folders are open in the UI. In any case, I like the second patch more, since it makes less assumptions, so I'm going to move the review requests to that one, if that's OK.
Attachment #354348 - Flags: superreview+
Attachment #354348 - Flags: review+
Oh, I see your point. For future reference, we use insertion sort for folder priority queue, and quick sort for the message queue. On a side note, Insertion sort is O(N) but we don't expect to sort more than 10-20 folders at any given time. I don't think it would pose any performance penalty.

>I like the second patch more, since it makes less assumptions, so I'm going to move the review requests
> to that one, if that's OK.

Agreed. Thanks.
Keywords: checkin-needed
Attachment #353843 - Attachment is obsolete: true
Attachment #353843 - Flags: superreview?(bienvenu)
Attachment #353843 - Flags: review?(bienvenu)
Comment on attachment 354348 [details] [diff] [review]
Rev 1.a (Prioritizing the opened folders by type)
[Checkin: Comment 6]

http://hg.mozilla.org/comm-central/rev/679cc40e2dbf
Attachment #354348 - Attachment description: Rev 1.a (Prioritizing the opened folders by type) → Rev 1.a (Prioritizing the opened folders by type) [Checkin: Comment 6]
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b3
You need to log in before you can comment on or make changes to this bug.