Closed Bug 1663614 Opened 4 years ago Closed 4 years ago

Throttle ResourceWatcher events on the client side

Categories

(DevTools :: Framework, enhancement)

enhancement

Tracking

(Fission Milestone:M6c, firefox83 fixed)

RESOLVED FIXED
83 Branch
Fission Milestone M6c
Tracking Status
firefox83 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 2 open bugs, Regressed 1 open bug)

Details

(Whiteboard: dt-fission-m2-mvp)

Attachments

(3 files, 2 obsolete files)

For now, each panel does its own throttling, in order to prevent updating Redux/React/the DOM each time a new item is to be displayed.

We end up with slightly different algorithms, different delays, different behavior, different bugs. We would definitely benefit from having a single, shared implemented of it. It would also suddently benefit to other resources, which are not throttled (stylesheet? css changes?)

Also, while working on bug 1620280, I realized that the SourceQueue component of the debugger is subject to dead locks by calling itself, where a Source can end up dispatching new sources and make the debugger stop updating because of such dead lock.
Having a throttling in ResourceWatcher shouldn't be subject to such dead lock.

Assignee: nobody → poirot.alex
Summary: Throttle ResourceWatcher event on the client side → Throttle ResourceWatcher events on the client side
Depends on: 1663617
Depends on: 1663717
Depends on: 1663873
Depends on: 1663875
Depends on: 1663877
Depends on: 1663974

Listening to TRACK_CHANGE is tricky because of the new throttling,
as it can be merged intermittently.
So, here I try to wait for any action that can spawn a TRACK_CHANGE event.
Unfortunately, I have to contribute to generic helpers that aren't specific to ChangesView.
But if any test is using it, with the ChangesView, it may fix things.

Because of this, in netmonitor stubs tests, the resource objects ends up loosing
"intermediate" state and now contains all information that we gathered by the time
we emit throttled resources.
The only way to address that would be to do an archived copy of each resource state,
but I don't think we want to do that...

Status: NEW → ASSIGNED
Depends on: 1665293
Depends on: 1665305
Depends on: 1665306
Depends on: 1665709

Comment on attachment 9175831 [details]
Bug 1663614 - Use same listener for NETWORK_EVENT and NETWORK_EVENT_STACKTRACE in order to guarantee event order.

Revision D90288 was moved to bug 1665709. Setting attachment 9175831 [details] to obsolete.

Attachment #9175831 - Attachment is obsolete: true

Tracking dt-fission-m2-mvp bugs for Fission Nightly milestone (M6c).

Fission Milestone: --- → M6c
Blocks: 1666495
Attachment #9174708 - Attachment is obsolete: true
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/623937cef0c5 Do not use EventEmitter API in ResourceWatcher. r=jdescottes https://hg.mozilla.org/integration/autoland/rev/45e631b0acc8 Throttle resources on the client side from ResourceWatcher. r=jdescottes,bomsy https://hg.mozilla.org/integration/autoland/rev/eb56db9c8312 Wait for state instead of TRACK_CHANGE events. r=bradwerth
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Blocks: 1824726
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: