Check performance when dispatching events in the parent process
Categories
(Remote Protocol :: Agent, task, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Whiteboard: [webdriver:m20])
To rule out race conditions when dispatching events from an action chain, especially when multiple actions run in parallel within a tick, we need to ensure that the required events are indeed dispatched. Event listeners must be installed in the content process to wait for the events to be processed by the browser and the related events to be emitted before returning to the parent process for further processing of the action chain.
| Reporter | ||
Comment 1•1 year ago
|
||
Further we should try to minimize the performance degradation caused by the additional step of waiting for the event to be dispatched. We should compare the results with Chrome's timings to ensure the impact is kept as low as possible.
| Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Comment 2•1 year ago
|
||
This work will be needed once we emit widget events. With just processing actions in the parent process but still synthesizing events in the content process we basically have no change in how the events are dispatched. Because we do not wait for the event to be dispatched now, we won't need it immediately.
With bug 1922077 we will release the first chunk of work to our users. As such lets move this bug into M14.
| Reporter | ||
Comment 3•1 year ago
|
||
I actually need some widget events implemented first before I can see how this will work. As such lets block on bug 1848957 which will implement the first widget event (wheel scroll).
Also not sure if it's immediately necessary so I'm going to set it as P3 for M14 and if I don't get to it lets prioritize as P2 again in the next milestone.
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Updated•11 months ago
|
| Reporter | ||
Updated•11 months ago
|
| Reporter | ||
Comment 4•10 months ago
|
||
Note that on bug 1962560 a workaround fix got landed which waits for 2 rAF's before continuing in the test after dispatching a wheel scroll event. Once we are waiting for the event to be dispatched we should remove it again.
| Reporter | ||
Updated•10 months ago
|
| Reporter | ||
Comment 5•8 months ago
|
||
For widget wheel scroll events I can see the following:
async=false (log) - 33ms:
[task 2025-06-13T06:09:30.004+00:00] 06:09:30 INFO - STDOUT: 1749794970000 Marionette DEBUG 0 -> [0,4,"WebDriver:PerformActions",{"actions":[{"actions":[{"deltaX":5,"deltaY":10,"origin":{"element-6066-11e4-a52e-4f735466cecf":"d6813369-c523-4f24-a874-86c977000336"},"type":"scroll","x":0,"y":0}],"id":"wheel_id","type":"wheel"}]}]
[task 2025-06-13T06:09:30.009+00:00] 06:09:30 INFO - STDOUT: 1749794970007 RemoteAgent TRACE Dispatching tick 1/1
[task 2025-06-13T06:09:30.021+00:00] 06:09:30 INFO - STDOUT: 1749794970018 RemoteAgent TRACE Dispatch WheelScrollAction with id: wheel_id pageX: 58 pageY: 319 deltaX: 5 deltaY: 10 async: false
[task 2025-06-13T06:09:30.023+00:00] 06:09:30 INFO - STDOUT: 1749794970018 RemoteAgent TRACE moveOverTime start: 0,0 target: 5,10 duration: 0
[task 2025-06-13T06:09:30.024+00:00] 06:09:30 INFO - STDOUT: 1749794970018 RemoteAgent TRACE WheelScrollAction.performOneWheelScrollStep [5,10]
[task 2025-06-13T06:09:30.037+00:00] 06:09:30 INFO - STDOUT: 1749794970033 Marionette DEBUG 0 <- [1,4,null,{"value":null}]
async=true (log) - 35ms:
[task 2025-06-13T15:26:54.200+00:00] 15:26:54 INFO - STDOUT: 1749828414198 Marionette DEBUG 0 -> [0,4,"WebDriver:PerformActions",{"actions":[{"actions":[{"deltaX":5,"deltaY":10,"origin":{"element-6066-11e4-a52e-4f735466cecf":"175e62bf-5e5c-4426-ac74-e647e7c73b79"},"type":"scroll","x":0,"y":0}],"id":"wheel_id","type":"wheel"}]}]
[task 2025-06-13T15:26:54.206+00:00] 15:26:54 INFO - STDOUT: 1749828414204 RemoteAgent TRACE Dispatching tick 1/1
[task 2025-06-13T15:26:54.217+00:00] 15:26:54 INFO - STDOUT: 1749828414215 RemoteAgent TRACE Dispatch WheelScrollAction with id: wheel_id pageX: 58 pageY: 319 deltaX: 5 deltaY: 10 async: true
[task 2025-06-13T15:26:54.219+00:00] 15:26:54 INFO - STDOUT: 1749828414217 RemoteAgent TRACE moveOverTime start: 0,0 target: 5,10 duration: 0
[task 2025-06-13T15:26:54.220+00:00] 15:26:54 INFO - STDOUT: 1749828414217 RemoteAgent TRACE WheelScrollAction.performOneWheelScrollStep [5,10]
[task 2025-06-13T15:26:54.223+00:00] 15:26:54 INFO - STDOUT: 1749828414220 RemoteAgent TRACE WebDriverProcessData actor created for PID 60030
[task 2025-06-13T15:26:54.224+00:00] 15:26:54 INFO - STDOUT: 1749828414221 Marionette TRACE [1] MarionetteCommands actor created for window id 2
[task 2025-06-13T15:26:54.237+00:00] 15:26:54 INFO - STDOUT: 1749828414233 Marionette DEBUG 0 <- [1,4,null,{"value":null}]
So even with dispatching the event in the parent process and passing it through APZ we do not seem to have any performance regression. But note that is just by inspecting a single performAction command.
| Reporter | ||
Comment 6•8 months ago
|
||
For a full assessment I need mouse and touch events as well. Given that this will not happen in M16 lets push to M17.
| Reporter | ||
Updated•8 months ago
|
| Reporter | ||
Updated•5 months ago
|
| Reporter | ||
Comment 7•5 months ago
|
||
We are running short for M18 so we agreed on to move this to M19.
| Reporter | ||
Comment 8•2 months ago
|
||
When manually inspecting the performance with async events so far I do not see a regression. As such lets still keep it in M19 (as discussed) but de-prioritize it.
| Reporter | ||
Updated•1 month ago
|
Description
•