Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(schedulers): improve performance of animationFrameScheduler and asapScheduler #7059

Merged

Commits on Sep 8, 2022

  1. Copy the full SHA
    bde6ad8 View commit details
    Browse the repository at this point in the history
  2. fix(animationFrameScheduler): improve performance of animationFrameSc…

    …heduler
    
    + 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 ReactiveX#7017
    related ReactiveX#7018
    related ReactiveX#6674
    benlesh committed Sep 8, 2022
    Copy the full SHA
    4759a8c View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2022

  1. chore: update api_guardian

    benlesh committed Sep 9, 2022
    Copy the full SHA
    fde8f5f View commit details
    Browse the repository at this point in the history
  2. refactor(QueueAction): Have requestActionId return 0

    Changes this to return `0` as a compromise given it was returning `void` in the past.
    benlesh committed Sep 9, 2022
    Copy the full SHA
    d415101 View commit details
    Browse the repository at this point in the history