Closed Bug 293114 Opened 20 years ago Closed 20 years ago

function InitMessageLabel performs very poorly for large selections

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: db48x)

References

()

Details

(Keywords: perf)

Attachments

(1 file, 2 obsolete files)

i got a slow script dialog trying to get a context menu for select all in a big newsgroup :)
Attached patch 293114-1.diff (obsolete) — Splinter Review
it could also skip the loop if the first item is labled with no label (or the default label or whatever it's called.) I'd have to look and see what sort of value checkedLabel gets in that case, and hardcode a test for it.
Attachment #182762 - Flags: review?(neil.parkwaycc.co.uk)
Maybe we should do the same as what we do for deleted/junk/marked/flagged messages i.e. just display the state of the first selected message.
yea, could move the check down to the second if, that would do it
Attached patch 293114-2.diff (obsolete) — Splinter Review
or, as you say, it can simply take the value of the first message in the selection
Comment on attachment 182763 [details] [diff] [review] 293114-2.diff In which case it would be more efficient to use hdrForFirstSelectedMessage as per the SelectedMessagesAreXXX functions.
Status: NEW → ASSIGNED
Attachment #182762 - Flags: review?(neil.parkwaycc.co.uk)
Attached patch 293114-3.diffSplinter Review
fixes thunderbird too, while I'm at it.
Attachment #182762 - Attachment is obsolete: true
Attachment #182763 - Attachment is obsolete: true
Attachment #183257 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 183257 [details] [diff] [review] 293114-3.diff Nice cleanup (although isChecked is now equivalent to checkedLabel == null, so there's further scope for potential cleanup ;-)
Attachment #183257 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #183257 - Flags: superreview?(roc)
Attachment #183257 - Flags: superreview?(roc) → superreview+
Attachment #183257 - Flags: approval1.8b3?
Attachment #183257 - Flags: approval1.8b3? → approval1.8b3+
Version: unspecified → Trunk
oops, I checked this in last week
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: