Clean up and simplify the AsyncTabSwitcher
Categories
(Firefox :: Tabbed Browser, task, P3)
Tracking
()
People
(Reporter: alexical, Assigned: alexical)
Details
Attachments
(3 files)
I think this is something we can do iteratively. But I have a few ideas off the bat for making things just a little easier to reason about. This might help with the Q4 goal of understanding how the AsyncTabSwitcher will be interacting with Fission, performance-wise.
Ideas:
- Send everything through one handleEvent function, so we don't have multiple call-sites for pre/postActions, and reentrancy is easier to reason about.
- Pull out all of the telemetry logic into a separate class, as it's mostly inlined and some of the telemetry stuff can take as many as 17 lines of code.
- Investigate pulling out the handling of non-remote browsers into an entirely separate code path so we don't clutter the AsyncTabSwitcher so much with isRemoteBrowser checks
Assignee | ||
Comment 1•6 years ago
|
||
This way we ensure that the reentrancy guard always stays in effect.
It should just be a little easier to reason about everything if it's
all channeled through the same place.
Assignee | ||
Comment 2•6 years ago
|
||
This just pulls chunks of TelemetryStopwatch and similar code,
which often eats up several lines, into some helper functions.
This should just help reduce the cognitive load of reading this
code.
Depends on D47349
Assignee | ||
Comment 3•6 years ago
|
||
This is just sometimes relevant for debugging things.
Depends on D47350
Comment 4•6 years ago
|
||
Along with these patches, with bug 1582042 landing, I wonder if we should pull out the LRU cache stuff for now, since it's basically dead code paths?
Assignee | ||
Updated•6 years ago
|
Comment 6•6 years ago
|
||
bugherder |
Comment 7•5 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:dthayer, maybe it's time to close this bug?
Assignee | ||
Comment 8•5 years ago
|
||
I suppose so - I think there's more cleanup that could be done but I don't think I'm going to get to it any time soon.
Description
•