Closed Bug 243281 Opened 20 years ago Closed 20 years ago

SortThreads is inefficient

Categories

(MailNews Core :: Backend, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

(Keywords: perf)

Attachments

(2 files)

I've got a news folder with over 250,000 threaded headers. There appear to be
three costs associated with opening the folder. The first cost only appears to
apply once per session; at least, switching folder to a local folder and back to
this news folder does not appear to incur this cost. The second cost appears to
apply every time the folder is opened, and can take up to three minutes. The
third cost is the sorting of the threads. With the current code, it takes a
little over 20 minutes to open the folder for the second time, and almost 20
minutes to resort the folder into a different order (I use size and order
received as they are pretty snappy sorts). I can reduce the time taken to sort
by order received to half a second, although strangely the time taken to open
the folder for subsequent times now varies wildy from one to five minutes.
Attached patch Proposed patchSplinter Review
The precondition never seems to get hit; it appears SortThreads can only be
called from Sort when threading is already enabled.

As I "collapse" the threads without marking them collapsed I have to set the
collapsed bit before re-expanding them unless you know of a better way?
Assignee: sspitzer → neil.parkwaycc.co.uk
Status: NEW → ASSIGNED
Attachment #148187 - Flags: review?(bienvenu)
can you attach a -uw diff so I can see what's really changed? I'll see if I can
hit the code you've removed - you might be right that it's not hit...
OK, the only place we call sort threads, the view flags do have the threaded bit
set, so that change is good.
Attached patch diff -uwSplinter Review
Comment on attachment 148187 [details] [diff] [review]
Proposed patch

thx, that looks good.
Attachment #148187 - Flags: review?(bienvenu) → review+
Attachment #148187 - Flags: superreview?(mscott)
Attachment #148187 - Flags: superreview?(mscott) → superreview+
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: