Closed Bug 1698461 Opened 4 years ago Closed 4 years ago

Improve selectors and performance of emailAddressPillOnPopupShown()

Categories

(Thunderbird :: Message Compose Window, task)

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
88 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: thomas8, Assigned: thomas8)

References

Details

(Keywords: perf)

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1696789 +++

I was looking at emailAddressPillOnPopupShown() while working on bug 1687432.
Let's simplify and cleanup here first. Better selectors are safer and faster, and we should not continue searching when we already know what we need to know.

Keywords: perf

Cleanup and improve performance of emailAddressPillOnPopupShown().

  • Avoid using querySelectorAll() on unlimited pills where querySelector() suffices.
  • Limit queries to #recipientsContainer instead of querying the entire document.
  • Bail out early as soon as conditions are satisfied.
  • Simplify the code.
Attachment #9209082 - Flags: review?(alessandro)
Comment on attachment 9209082 [details] [diff] [review] 1698461_cleanup-emailAddressPillOnPopupShown.diff Review of attachment 9209082 [details] [diff] [review]: ----------------------------------------------------------------- This makes sense. Thanks for the improvements.
Attachment #9209082 - Flags: review?(alessandro) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/97d9bf011825
Improve selectors and performance of emailAddressPillOnPopupShown(). r=aleca

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

I've just noticed this patch got pushed with my username instead of Thomas's. Clearly I screwed up the landing somehow. I'm going to back it out and re-land.

Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/87031e5a8f0c Improve selectors and performance of emailAddressPillOnPopupShown(). r=aleca DONTBUILD
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: