Closed
Bug 1463555
Opened 6 years ago
Closed 6 years ago
Queue adding the tabs to the inspector sidebar
Categories
(DevTools :: Inspector, enhancement, P3)
DevTools
Inspector
Tracking
(firefox62 fixed)
RESOLVED
FIXED
Firefox 62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: gl, Assigned: gl)
References
Details
Attachments
(1 file)
We can significantly improve the performance of adding the sidebar panels to the inspector sidebar by queuing up all the tabs to add, and setting the new state once to reduce the number of renders that occur for each time we call setState from adding a new tab.
Assignee | ||
Updated•6 years ago
|
Summary: Queue adding the → Queue adding the tabs to the inspector sidebar
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
mozreview-review |
Comment on attachment 8979831 [details]
Bug 1463555 - Queue adding the tabs to the inspector sidebar.
https://reviewboard.mozilla.org/r/246002/#review252110
Thansk for working on this Gabriel.
Looks good to me, but please see my inline comments.
Also, I am curious how much this improves the performance.
Do you have some data from Talos prooving that
this makes the UI faster?
Honza
::: devtools/client/shared/components/tabs/TabBar.js:145
(Diff revision 1)
> +
> + let tabs = this.state.tabs.slice();
> + let activeId;
> + let activeTab;
> +
> + for (let { id, index, panel, selected, title, url } of this.queuedTabs) {
Content of this loop is duplicating `addTab` method. Can you reuse that method in the loop? Or use another way to dup the code?
::: devtools/client/shared/components/tabs/TabBar.js:172
(Diff revision 1)
> + });
> +
> + this.queuedTabs = [];
> + }
> +
> + queueTab(id, title, selected = false, panel, url, index = -1) {
Please add a comment explaining why tab-queuing APIs have been introduced.
Attachment #8979831 -
Flags: review?(odvarko)
Assignee | ||
Comment 7•6 years ago
|
||
This is the talos result https://treeherder.mozilla.org/perf.html#/comparesubtest?originalProject=try&originalRevision=cbf6c1d8fb2beb8532011c18b8c345f18f30b5c7&newProject=try&newRevision=abb93b152e860a9b346fec288f5777f4be79bb16&originalSignature=f79b6a4f1f8f53326d3056f6c8008c0ff4de0a94&newSignature=f79b6a4f1f8f53326d3056f6c8008c0ff4de0a94&framework=1. We're looking at 4-5%% improvement on open.
Assignee | ||
Comment 8•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8979831 [details]
Bug 1463555 - Queue adding the tabs to the inspector sidebar.
https://reviewboard.mozilla.org/r/246002/#review252110
> Content of this loop is duplicating `addTab` method. Can you reuse that method in the loop? Or use another way to dup the code?
I don't think we can do anything about reusing the code in a helper or using the addTab method here. The point of this was to limit the setState call to just once with all the queued tabs.
Comment hidden (mozreview-request) |
Comment 10•6 years ago
|
||
mozreview-review |
Comment on attachment 8979831 [details]
Bug 1463555 - Queue adding the tabs to the inspector sidebar.
https://reviewboard.mozilla.org/r/246002/#review252478
Thanks for the update!
R+ assuming try is green
Honza
Attachment #8979831 -
Flags: review?(odvarko) → review+
Comment 11•6 years ago
|
||
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7690bdfe60a0
Queue adding the tabs to the inspector sidebar. r=Honza
Comment 12•6 years ago
|
||
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/30c7c7093432
Followup: Remove unexpected 'debugger' statement. r=me CLOSED TREE
Comment 13•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7690bdfe60a0
https://hg.mozilla.org/mozilla-central/rev/30c7c7093432
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Comment 14•6 years ago
|
||
Thanks Gabriel, this patch recovered a significant part of the 3panes regression.
Two mores like this one and we get back to the baseline perf :)
http://firefox-dev.tools/performance-dashboard/perfherder/?test=complicated.inspector.open&days=14&filterstddev=true
Comment 15•6 years ago
|
||
Noticed perf improvements:
== Change summary for alert #13621 (as of Thu, 24 May 2018 17:56:10 GMT) ==
Improvements:
4% damp windows10-64 pgo e10s stylo 85.00 -> 81.20
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=13621
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•