You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(schedulers): improve performance of animationFrameScheduler and asapScheduler (#7059)
* refactor(schedulers): Appropriately type action ids
* fix(animationFrameScheduler): improve performance of animationFrameScheduler
+ Changes the check for existing action ids to simply check the last action in the queue to see if its id matches. Previously we were doing an O(n) loop on each execution of an action to check to see if the scheduling id needed to be recycled. This is problematic in AsapScheduler and AnimationFrameScheduler, where we're not reusing an interval. Since AsapScheduler and AnimationFrameScheduler reuse the most recent action id until their scheduled microtask or animation frame fires, the last action in the actions queue array is all we really need to check (rather than checking them all with `some`). O(1) vs O(n).
+ Refactors a weird conditional gaff from `if ((X && A) || (!X && B))` to just be `if (X ? A : B)`
resolves#7017
related #7018
related #6674
* chore: update api_guardian
* refactor(QueueAction): Have requestActionId return 0
Changes this to return `0` as a compromise given it was returning `void` in the past.
0 commit comments