Improve caching of tabbrowser-tab fragment
Categories
(Firefox :: Tabbed Browser, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: bgrins, Assigned: bgrins)
References
Details
(Keywords: perf, Whiteboard: [fxperf:p2])
Attachments
(1 file)
Right now it's caching it on each element: https://searchfox.org/mozilla-central/rev/8a63fc190b39ed6951abb4aef4a56487a43962bc/browser/base/content/tabbrowser-tab.js#74. In practice this isn't any better than not caching since we only run connectedCallback logic once per tab.
If we move this stored value onto the constructor it means we'd only need to call parseXULToFragment a max of once per document instead of once per new tab.
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
This means we only need to call parseXULToFragment a max of once per document
instead of a maximum of once per tab (which in practice isn't any better than
not caching since we only run connectedCallback logic once per tab).
Assignee | ||
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
I don't suppose we have perf numbers for the impact of fixing this and/or runtime cost we see right now for e.g. opening 1000 tabs?
Assignee | ||
Comment 4•5 years ago
|
||
(In reply to :Gijs (he/him) from comment #3)
I don't suppose we have perf numbers for the impact of fixing this and/or runtime cost we see right now for e.g. opening 1000 tabs?
The best I have is this (ongoing) talos push https://treeherder.mozilla.org/perf.html#/compare?originalProject=try&originalRevision=a4686b3f6d8a766989d11fc3f1b6abe3eb1a2e25&newProject=try&newRevision=0889dc9078d5f9a6d10d41227e938e86ab252b7b&framework=1&showOnlyImportant=1.
Comment 6•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
I'd like to validate that this showed up as an improvement on talos after it hit m-c, since it was clear on try pushes: https://treeherder.mozilla.org/perf.html#/compare?originalProject=try&originalRevision=a4686b3f6d8a766989d11fc3f1b6abe3eb1a2e25&newProject=try&newRevision=0889dc9078d5f9a6d10d41227e938e86ab252b7b&framework=1&showOnlyImportant=1.
Updated•5 years ago
|
Comment 8•5 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #7)
I'd like to validate that this showed up as an improvement on talos after it hit m-c, since it was clear on try pushes: https://treeherder.mozilla.org/perf.html#/compare?originalProject=try&originalRevision=a4686b3f6d8a766989d11fc3f1b6abe3eb1a2e25&newProject=try&newRevision=0889dc9078d5f9a6d10d41227e938e86ab252b7b&framework=1&showOnlyImportant=1.
Alex, be on the lookup for any Talos improvements that may related to this bug. Please reply back when/if you see something.
Updated•5 years ago
|
Description
•