Improve performance of RowCellColumnToCollationKey

RESOLVED FIXED

Status

RESOLVED FIXED
16 years ago
11 years ago

People

(Reporter: neil, Assigned: neil)

Tracking

({perf})

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

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

Comment 1

16 years ago
Created attachment 131661 [details] [diff] [review]
Proposed patch
(Assignee)

Updated

16 years ago
Attachment #131661 - Flags: superreview?(scott)
Attachment #131661 - Flags: review?(bienvenu)

Updated

16 years ago
Attachment #131661 - Flags: review?(bienvenu) → review+

Comment 2

16 years ago
-> Neil
Assignee: bienvenu → neil.parkwaycc.co.uk

Updated

16 years ago
Attachment #131661 - Flags: superreview?(scott) → superreview+
(Assignee)

Comment 3

16 years ago
Fix checked in.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
(Assignee)

Comment 4

16 years ago
Created attachment 132166 [details] [diff] [review]
Fix null subject crash

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

Updated

16 years ago
Attachment #132166 - Flags: review?(bienvenu)
Comment on attachment 132166 [details] [diff] [review]
Fix null subject crash

sr=bzbarsky
Attachment #132166 - Flags: superreview+

Comment 6

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