Open Bug 1358054 Opened 3 years ago Updated 6 months ago

[Performance] combine double updateRequest call while receive event in _onNetworkEventUpdate

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: gasolin, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [netmonitor-reserve])

Attachments

(1 file)

in _onNetworkEventUpdate there are 3 cases that we called updateRequest twice. They are

* _onSecurityInfo
* _onResponseContent
* _onEventTimings

http://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/netmonitor-controller.js#607

onResponseContent is handled in Bug 1356957, we can combine the rest double updateRequest call while receive events
See Also: → 1356957
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1356957
No longer blocks: netmonitor-phaseII
Status: RESOLVED → REOPENED
Depends on: 1356957
Resolution: DUPLICATE → ---
React has implemented its batched update mechanism when seeing frequent props update in a short time. I suspect that influence of this patch would be minor.

Fred,

Beside fixing test failures, if you still think that it's worth to land this patch, could you verify how many times subscribe listener calls decrease after applying your patch?

(Every subscribe listener calls imply one react components update)

Add a console.log in index.js (launchpad) or index.html (toolbox) to see

let count = 0;
store.subscribe(() => {
  console.log(count++);
});
Flags: needinfo?(gasolin)
Thanks for the suggestion.

After apply the patch, it reduced state update from 105 -> 102 for 144 requests from bbc.com , so it might not worth to fix this at this time
Assignee: gasolin → nobody
Status: REOPENED → NEW
Flags: needinfo?(gasolin)
Priority: -- → P3
Flags: qe-verify?
Whiteboard: [netmonitor-reserve]
attach WIP patch in case someone want to pick it and fix the test
No longer blocks: 1362054
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.