Improve performance of RowCellColumnToCollationKey

RESOLVED FIXED

Status

MailNews Core
Database
RESOLVED FIXED
15 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

15 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

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

Updated

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

Updated

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

Comment 2

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

Updated

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

Comment 3

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

Comment 4

15 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

15 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

15 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.