SortThreads is inefficient

RESOLVED FIXED

Status

MailNews Core
Backend
RESOLVED FIXED
14 years ago
10 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: neil@parkwaycc.co.uk)

Tracking

({perf})

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

14 years ago
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.
(Assignee)

Comment 1

14 years ago
Created attachment 148187 [details] [diff] [review]
Proposed patch

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
(Assignee)

Updated

14 years ago
Attachment #148187 - Flags: review?(bienvenu)

Comment 2

14 years ago
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...

Comment 3

14 years ago
OK, the only place we call sort threads, the view flags do have the threaded bit
set, so that change is good.
(Assignee)

Comment 4

14 years ago
Created attachment 148257 [details] [diff] [review]
diff -uw

Comment 5

14 years ago
Comment on attachment 148187 [details] [diff] [review]
Proposed patch

thx, that looks good.
Attachment #148187 - Flags: review?(bienvenu) → review+
(Assignee)

Updated

14 years ago
Attachment #148187 - Flags: superreview?(mscott)

Updated

14 years ago
Attachment #148187 - Flags: superreview?(mscott) → superreview+
(Assignee)

Updated

14 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 14 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.