Some cleanup, round 2
Categories
(DevTools :: Performance Tools (Profiler/Timeline), task)
Tracking
(firefox92 fixed)
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(24 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1721072 - Stop supplying a perfFront argument to about:profiling's gInit function. r=canaltinova
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
The Performance devtools panel, and the profiler settings (about:profiling), use the same redux state shape, actions, and reducers.
However, some parts of the state are only needed for the devtools panel and not for about:profiling, specifically everything that's related to starting/stopping the recording.
This causes some confusion in the about:profiling initializer, which still has to deal with these unneeded pieces of machinery.
In this bug I'll try to untangle that situation, and sneak some other cleanup in between.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Sometimes these settings come from a preset, and other times they come from Firefox about:config preferences.
Calling them settings removes the ambiguity with Firefox prefs.
Other parts of the codebase call these ProfilerInitParams.
Depends on D120034
Assignee | ||
Comment 2•4 years ago
|
||
This reduces confusion with the RecordingState type, which describes whether
we are currently recording.
Depends on D120143
Assignee | ||
Comment 3•4 years ago
|
||
We were using the same type for settings with interval in milliseconds and
settings with interval in microseconds.
There was no type checking to ensure that we do the translation in the right places.
Now the interval is always in milliseconds, is documented as such in the type,
and the translation happens only where we read from and write to prefs.
The "preference-management" module is removed.
Depends on D120144
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D120145
Assignee | ||
Comment 5•4 years ago
|
||
This callback was always called directly afterwards. Calling it directly
slightly changes the order, but doesn't affect anything, and the call still
happens when the profile is obtained, and not before.
Depends on D120146
Assignee | ||
Comment 6•4 years ago
|
||
This functionality is only needed by the devtools panel, so it doesn't make
sense to store it in the state object whose type is also used for about:profiling.
And now it's more like a component event listener, which looks more natural than
a callback function in the redux state.
Depends on D120147
Assignee | ||
Comment 7•4 years ago
|
||
Depends on D120148
Assignee | ||
Comment 8•4 years ago
|
||
I think expressing this as a react prop feels more natural. This also stops it
from polluting the state type, which is shared between both the devtools panel
and about:profiling itself.
Unfortunately, there is a small hole in the typescript coverage: If I don't pass
any OwnProps to DevToolsPresetSelection, i.e. use DevToolsPresetSelection() in
the parent render method, then the type system does not detect the missing
onEditSettingsLinkClicked prop. But when I use DevToolsPresetSelection({}) (i.e.
pass an empty OwnProps object), then it does detect it.
Depends on D120149
Assignee | ||
Comment 9•4 years ago
|
||
Depends on D120150
Assignee | ||
Comment 10•4 years ago
|
||
The old name had both 'did' and 'stopped' in it.
Depends on D120151
Assignee | ||
Comment 11•4 years ago
|
||
Now gDevTools.showToolboxForTab
will only finish once gInit
is done.
Without this, the test helper function withDevToolsPanel
would sometimes
call the callback before panelWin.gStore
was assigned, leading to test
failures. I noticed this when I added another await
to gInit
, which
affected ordering.
Depends on D120152
Assignee | ||
Comment 12•4 years ago
|
||
This means that we don't need to mount the ProfilerEventHandling component to get this piece of information.
Depends on D120153
Assignee | ||
Comment 13•4 years ago
|
||
This component now only does two things:
- It maintaings the redux state's recordingState property, which is only used
by the RecordingButton component, which is only used in the devtools panel. - It stops the profiler if it's still running when the component is unloaded.
about:profiling doesn't need those things to happen.
Depends on D120154
Assignee | ||
Comment 14•4 years ago
|
||
Depends on D120155
Assignee | ||
Comment 15•4 years ago
|
||
This wasn't caught because combineReducers is currently not checked by the type system.
Depends on D120156
Assignee | ||
Comment 16•4 years ago
|
||
Depends on D120157
Assignee | ||
Comment 17•4 years ago
|
||
Depends on D120158
Assignee | ||
Comment 18•4 years ago
|
||
Depends on D120159
Assignee | ||
Comment 19•4 years ago
|
||
What ProfilerEventHandling was doing was basically a reducer, just
not in the place where reducers are normally put.
Depends on D120160
Assignee | ||
Comment 20•4 years ago
|
||
Now it's only used in components that are used in the devtools panel.
It is no longer used for about:profiling.
Depends on D120161
Assignee | ||
Comment 21•4 years ago
|
||
Depends on D120162
Assignee | ||
Comment 22•4 years ago
|
||
Depends on D120163
Assignee | ||
Comment 23•4 years ago
|
||
Depends on D120164
Assignee | ||
Comment 24•4 years ago
|
||
This function is now only used by the keyboard shortcuts and by the popup.
Depends on D120165
Comment 25•4 years ago
|
||
Comment 26•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f1e6a917d46e
https://hg.mozilla.org/mozilla-central/rev/54a3294ac7df
https://hg.mozilla.org/mozilla-central/rev/4b99909058ad
https://hg.mozilla.org/mozilla-central/rev/6fdd263f4669
https://hg.mozilla.org/mozilla-central/rev/a8445267393d
https://hg.mozilla.org/mozilla-central/rev/e5f14ea648ac
https://hg.mozilla.org/mozilla-central/rev/9d4aadf04e2f
https://hg.mozilla.org/mozilla-central/rev/eec6c510e5c3
https://hg.mozilla.org/mozilla-central/rev/f58ccd08bec7
https://hg.mozilla.org/mozilla-central/rev/c39344d8ee2e
https://hg.mozilla.org/mozilla-central/rev/5d2392c3c723
https://hg.mozilla.org/mozilla-central/rev/25f7e205ee23
https://hg.mozilla.org/mozilla-central/rev/bbc11216538d
https://hg.mozilla.org/mozilla-central/rev/8db115bfd265
https://hg.mozilla.org/mozilla-central/rev/8451bf8b203a
https://hg.mozilla.org/mozilla-central/rev/75a7f66953f0
https://hg.mozilla.org/mozilla-central/rev/6fb6a566e37b
https://hg.mozilla.org/mozilla-central/rev/b72f39d675de
https://hg.mozilla.org/mozilla-central/rev/3c50ce926db3
https://hg.mozilla.org/mozilla-central/rev/b3918a3a7ec9
https://hg.mozilla.org/mozilla-central/rev/0b2eca930c4f
https://hg.mozilla.org/mozilla-central/rev/3f6969fd4420
https://hg.mozilla.org/mozilla-central/rev/9a782a67b60b
https://hg.mozilla.org/mozilla-central/rev/0cbc2b32a366
Description
•