Breakable lines are fetch twice in the debugger frontend
Categories
(DevTools :: Debugger, enhancement)
Tracking
(firefox137 fixed)
| Tracking | Status | |
|---|---|---|
| firefox137 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
(Keywords: perf-alert)
Attachments
(1 file)
While investigating bug 1942774, I saw duplicated actions for retrieving breakable lines of each source.
We were also unconditionaly fetching breakable lines of all HTML sources, regardless of them being selected or not.
This may have led to performance troubles on websites having many iframes or iframe with large html page.
| Assignee | ||
Comment 1•1 year ago
|
||
We can't use either memoizableAction, nor the promise middleware.
memoizableActionhelps memoize on the long run,
but doesn't handle mutliple calls made for the same ressource
before the async computation of the value.promisemiddleware explicitely prevents exposing the actual
Promise to the reducer, which prevents exposing it to the selector.
Ultimately, we have to expose that async promise done to compute the reducer data,
that's the one the frontend should wait for on any subsequent run for the same ressource.
These two existing APIs are weak and should probably be removed in favor
of something similar to the current patch.
Last, but not least, this approach doesn't leak all data indefinitely
until DevTools closes (memoizableAction does)
Also tweak the new-source action in order to force fetching breakable lines
of HTML sources, only if that source is currently selected.
We were computing breakable lines for all HTML sources, for example when
having iframes.
Updated•1 year ago
|
Comment 3•1 year ago
|
||
| bugherder | ||
Comment 4•1 year ago
|
||
(In reply to Pulsebot from comment #2)
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb56e068ecea
[devtools] Avoid fetching breakable lines more than once per source.
r=devtools-reviewers,bomsy
Perfherder has detected a devtools performance change from push cb56e068ecea83724815f25fc65bdc652c412d42.
Improvements:
| Ratio | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|
| 8% | damp complicated.jsdebugger.close.DAMP | windows11-64-shippable-qr | e10s fission stylo webrender | 11.54 -> 10.61 |
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.
You can run these tests on try with ./mach try perf --alert 44220
For more information on performance sheriffing please see our FAQ.
Description
•