File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
internals/scheduler/src/lib
src/lib/render-strategies Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -419,6 +419,9 @@ function forceFrameRate(fps) {
419
419
// reset the framerate
420
420
yieldInterval = 5 ;
421
421
}
422
+ // be aware of browser housekeeping work (~6ms per frame)
423
+ // according to https://developers.google.com/web/fundamentals/performance/rendering
424
+ yieldInterval = Math . max ( 5 , yieldInterval - 6 ) ;
422
425
}
423
426
424
427
const performWorkUntilDeadline = ( ) => {
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ import {
14
14
} from '../model' ;
15
15
import { coalescingManager } from '@rx-angular/cdk/coalescing' ;
16
16
17
- forceFrameRate ( 60 ) ;
17
+ // set default to 30fps, actually matching other frameworks defaults:
18
+ // https://github.com/WICG/scheduling-apis/blob/main/misc/userspace-schedulers.md#appendix-scheduler-case-studies
19
+ forceFrameRate ( 30 ) ;
18
20
19
21
const noPriorityStrategy : RxStrategyCredentials = {
20
22
name : 'noPriority' ,
You can’t perform that action at this time.
0 commit comments