Merge pull request #114957 from TacticalDan/tacticaldan/scrollingPerformance
Reduce arbitrary event limiter from 16ms down to 4.16666 (#107016)
This commit is contained in:
commit
750888c496
1 changed files with 2 additions and 2 deletions
|
@ -284,7 +284,7 @@ export function modify(callback: () => void): IDisposable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add a throttled listener. `handler` is fired at most every 16ms or with the next animation frame (if browser supports it).
|
||||
* Add a throttled listener. `handler` is fired at most every 8.33333ms or with the next animation frame (if browser supports it).
|
||||
*/
|
||||
export interface IEventMerger<R, E> {
|
||||
(lastEvent: R | null, currentEvent: E): R;
|
||||
|
@ -295,7 +295,7 @@ export interface DOMEvent {
|
|||
stopPropagation(): void;
|
||||
}
|
||||
|
||||
const MINIMUM_TIME_MS = 16;
|
||||
const MINIMUM_TIME_MS = 8;
|
||||
const DEFAULT_EVENT_MERGER: IEventMerger<DOMEvent, DOMEvent> = function (lastEvent: DOMEvent | null, currentEvent: DOMEvent) {
|
||||
return currentEvent;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue