Open Bug 1515780 Opened Last year Updated 12 days ago

Consider more aggressively throttling deviceorientation events

Categories

(Core :: DOM: Device Interfaces, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mconley, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [geckoview:p2] [qf:p3:responsiveness])

See bug 1511731 comment 8. There's a profile there where we're spending a bunch of time servicing deviceorientation events, and that's causing page jank.

If we're not already throttling those events, we should consider it. If we're already throttling them, maybe we're not throttling them enough.
Priority: -- → P3

Adding [qf] whiteboard tag so the Performance team will review this bug.

Whiteboard: [geckoview:p2] [qf]
Whiteboard: [geckoview:p2] [qf] → [geckoview:p2] [qf:p3:responsiveness]
Duplicate of this bug: 1515235
Depends on: 1217942

When I test bug 1217942's sample on Chrome today, sampling rate is changed on current Chrome version. But sampling rate seems to be 60fps on Chrome 76.

I guess that device orientation uses 60fps for sampling rate on Blink now?
https://cs.chromium.org/chromium/src/device/vr/orientation/orientation_device.cc?q=set_frequency&l=101&dr=C
https://cs.chromium.org/chromium/src/services/device/public/cpp/generic_sensor/sensor_traits.h?dr=C&g=0&l=14

rbarker or snorp, do we still need use SENSOR_DELAY_FASTEST for some sensor types? Although we changed this value from SENSOR_DELAY_GAME to SENSOR_DELAY_FASTEST by bug 1217942, Chrome already changed to 60fps (according to https://caseyyee.github.io/DevicemotionTest/) . Since some sites listen deviceorientation event, this event handler is called a lot.

Flags: needinfo?(snorp)
Flags: needinfo?(rbarker)

(In reply to Makoto Kato [:m_kato] from comment #4)

rbarker or snorp, do we still need use SENSOR_DELAY_FASTEST for some sensor types? Although we changed this value from SENSOR_DELAY_GAME to SENSOR_DELAY_FASTEST by bug 1217942, Chrome already changed to 60fps (according to https://caseyyee.github.io/DevicemotionTest/) . Since some sites listen deviceorientation event, this event handler is called a lot.

Hmm, I guess if Chrome throttles them we can too. Do we care about the webvr polyfill anymore? Probably not?

Flags: needinfo?(snorp)
Flags: needinfo?(rbarker)
You need to log in before you can comment on or make changes to this bug.