Closed
Bug 1281268
Opened 8 years ago
Closed 8 years ago
Measure overhead of GPU process on APZ
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla51
People
(Reporter: rhunt, Assigned: rhunt)
References
(Blocks 1 open bug)
Details
(Keywords: feature, Whiteboard: [gfx-noted])
Attachments
(2 files, 1 obsolete file)
12.58 KB,
patch
|
Details | Diff | Splinter Review | |
72.86 KB,
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
Details |
What would be the overhead of synced ipc between nsBaseWidget and a GPU process, for input events that APZ needs?
Assignee | ||
Comment 1•8 years ago
|
||
Created a simple ipc stub, and performed quick measurements of times for certain operations, with and without ipc.
Assignee | ||
Comment 2•8 years ago
|
||
IPC tests were timed as total of: 1. sending a nop sync message to the GPU process 2. performing mAPZC->ReceiveInputEvent NoIPC tests were timed as total of: 1. performing mAPZC->ReceiveInputEvent All this happens in nsBaseWidget::DispatchInputEvent Tests were done individually for MouseEvent, KeyboardEvent, ScrollEvent, with and without IPC enabled. Summary (seconds): Mean Stddev ipc mouse 0.0003730906845 0.0001205557166 noipc mouse 0.00001494497903 0.00001190032155 dif 0.0003581457055 0.000108655395 ipc keyboard 0.0004262805017 0.0001571841219 noipc keyboard 0.00001429424779 0.00001163543264 dif 0.0004119862539 0.0001455486892 ipc scroll 0.0007133422222 0.0002705047813 noipc scroll 0.0001642239336 0.0001003429982 dif 0.0005491182886 0.0001701617831
Blocks: e10s-gpu
Comment 3•8 years ago
|
||
So the time spent is increased by an order of magnitude and then some? That's not ideal.
Comment 4•8 years ago
|
||
... but considering that the absolute time increase is still sub-millisecond, we can probably live with it for now. Definitely good to have measured this though, if we find that input event handling time spikes we'll know how much of it to attribute to this IPC overhead.
Do we have to worry about the throughput or something like that when there are a lot of events?
Comment 6•8 years ago
|
||
We might, I'm not sure how frequently input events arrive on different platforms. Touch events tend to be throttled to ~1 per vsync interval, so that's not bad. Mousemove events might be more frequent.
Is this "just" for scrolling/APZ events, or for any mouse events (e.g., game play)?
Assignee | ||
Comment 8•8 years ago
|
||
It's any event on nsBaseWidget::DispatchInputEvent so it was including MouseMoveEvents. I don't know how fast they come in, but after ten seconds there were a lot of data points.
Comment 9•8 years ago
|
||
And yes, it includes events intended for game play, not just scrolling. We might be able to add a short-circuit path that skips APZ/GPU process if we know there's nothing scrollable in the layer tree. This was something we had thought about doing to reduce event latency on B2G for games but never got around to doing.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → rhunt
Assignee | ||
Comment 10•8 years ago
|
||
Now that there is a working version of APZ on the gpu process I thought it would be worth looking at this again. I did the same idea of test as before, by measuring the time it takes to execute mApz->ReceiveInputEvent (http://searchfox.org/mozilla-central/source/widget/nsBaseWidget.cpp#1251) for different input events and with or without the gpu process. I went to http://news.google.com and scrolled around, moved the mouse, and would type in the search box. The test lasted a minute for with the gpu process, and without. The results are very similar to before so that's not surprising. Summary (seconds): Mean Stddev Data Points ipc mouse 0.0004690852459 0.0006975921603 2135 noipc mouse 0.0000323615527 0.00001675954085 2705 ipc keyboard 0.0003849004815 0.0001614448421 623 noipc keyboard 0.0000254749499 0.0000150123401 499 ipc wheel 0.0006750419753 0.001069712717 406 noipc wheel 0.00007738832487 0.0000404045465 394
Assignee | ||
Comment 11•8 years ago
|
||
The raw data from the test.
Attachment #8764010 -
Attachment is obsolete: true
Comment 12•8 years ago
|
||
Thanks for re-running these numbers!
Assignee | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•