Closed Bug 219552 Opened 21 years ago Closed 21 years ago

Improve performance of RowCellColumnToCollationKey

Categories

(MailNews Core :: Database, 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 was doing some basic performance testing on sorting 10000+ messages by subject (because that's how I read bugmail) and have in the past improved performance in intl by optimizing AllocateRawSortKey but now I'm turning my attention further up the chain :-) By inlining the code in RowCellColumnToCollationKey I was able to avoid some steps and pass an nsAString directly to AllocateRawSortKey. This appeared to speed up sorting by about 10%.
Attached patch Proposed patchSplinter Review
Attachment #131661 - Flags: superreview?(scott)
Attachment #131661 - Flags: review?(bienvenu)
Attachment #131661 - Flags: review?(bienvenu) → review+
-> Neil
Assignee: bienvenu → neil.parkwaycc.co.uk
Attachment #131661 - Flags: superreview?(scott) → superreview+
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
What was happening for an empty subject was that ...ToMime2DecodedString just returned early, and an empty collation key was created. Now when I inlined ...ToMime2DecodedString I copied the early return, unfortunately this means that no collation key is created, therefore crash. The fix is to copy code from ...ToAddressCollationKey which passes the string to DecodeMimeHeader which will return early for an empty string anyway.
Attachment #132166 - Flags: review?(bienvenu)
Comment on attachment 132166 [details] [diff] [review] Fix null subject crash sr=bzbarsky
Attachment #132166 - Flags: superreview+
Comment on attachment 132166 [details] [diff] [review] Fix null subject crash r/sr=me
Attachment #132166 - Flags: review?(bienvenu) → review+
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: