Closed Bug 500214 Opened 15 years ago Closed 15 years ago

tabbrowser.xml and browser-tabPreviews.js use mutation event listeners

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.7a1

People

(Reporter: smaug, Assigned: dao)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, perf)

Attachments

(1 file)

Using mutation event listeners slows down all the dom mutations in the document they are used. We should try to avoid them in chrome.
The event listeners are only added when the ctrl-tab panel opens and removed when it closes. Is that really a problem?
Currently just adding a mutation listener sets a flag to the window object, which triggers checks for the particular mutation event. Removing listener doesn't remove the flag. We could fix that by using a counter and not a flag, but not sure if it is really worth it. Would it be possible to change tabPreviews to not to use mutation events?
It's certainly possible, but it seems like a non-trivial task, and it would duplicate the existing infrastructure that updates the tab attributes.
Keywords: perf
Hardware: x86 → All
Version: unspecified → Trunk
(In reply to comment #2) > We could fix that by using a counter and not a flag, but not sure if it is > really worth it. And this is certainly not trivial way to fix this bug.
Blocks: 465076
Flags: blocking-firefox3.6?
Note that the legacy all tabs popup also uses mutation events, and did so for ages.
Ah, perhaps this shouldn't then block 3.6. But should be fixed anyway.
As per comment 6
Flags: wanted-firefox3.6+
Flags: blocking-firefox3.6?
Flags: blocking-firefox3.6-
Assignee: nobody → dao
Attached patch patch (deleted) — Splinter Review
Attachment #407253 - Flags: superreview?(mconnor)
Attachment #407253 - Flags: review?(vladimir)
Summary: browser-tabPreviews.js uses mutation event listeners → tabbrowser.xml and browser-tabPreviews.js use mutation event listeners
Attachment #407253 - Flags: superreview?(mconnor) → superreview+
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
Ctrl-Tab and All-Tabs panel work fine. Verified fixed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20091221 Minefield/3.7a1pre ID:20091221034526
Status: RESOLVED → VERIFIED
Depends on: 596687
need to document the TabAttrModified event
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: