Closed Bug 410369 Opened 18 years ago Closed 18 years ago

Some operations are very slow on large numbers of messages

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

References

Details

(Keywords: perf)

Attachments

(1 file)

While trying to clear out a mailbox with about 100000 messages I ran into the problem that almost everything I did was painstakingly slow. Often the problem was building up an array an element at a time so I checked nsMsgDBView.cpp to see where we could reserve space or otherwise avoid reallocating.
Attached patch Some speedupSplinter Review
Most of the optimisation here is concerned with using SetSize and SetAt instead of Add, however for mark thread as read I just allocated the space as some of the thread may already be read, while for expanding a thread I preinserted the number of elements I thought I was going to add in advance; this is the trickiest part of the patch and if you prefer we can address that separately.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #294992 - Flags: superreview?(bienvenu)
Attachment #294992 - Flags: review?(bienvenu)
Comment on attachment 294992 [details] [diff] [review] Some speedup thx, Neil - seems to work fine so far...
Attachment #294992 - Flags: superreview?(bienvenu)
Attachment #294992 - Flags: superreview+
Attachment #294992 - Flags: review?(bienvenu)
Attachment #294992 - Flags: review+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Depends on: 412268
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: