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

feat(effect): refactorings to improve performance, reduce memory usage #2345

Closed
wants to merge 11 commits into from
Closed

feat(effect): refactorings to improve performance, reduce memory usage #2345

wants to merge 11 commits into from

Commits on Nov 16, 2020

  1. feat(effect): use Class for effect

    Reduces memory usage for (computed) refs by 25% and improves creation performance
    basvanmeurs committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    44dedfb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f9ed4c3 View commit details
    Browse the repository at this point in the history
  3. feat(effect): set 'allowRecurse' as param

    Move out of the ReactiveEffectOptions in an effort to remove the necessity of creating this object for most use cases, saving memory and performance.
    basvanmeurs committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    134e33c View commit details
    Browse the repository at this point in the history
  4. feat(effect): reduce memory consumption

    Move several options to params, so that an object is not required for watchers or computeds. This reduces memory. On top of that, place some optional params on the prototype unless non-default.
    basvanmeurs committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    6b26c38 View commit details
    Browse the repository at this point in the history
  5. feat(effect): rename _effect to effect

    There's no point in underscoring the effect property of the runner.
    basvanmeurs committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    d649a4d View commit details
    Browse the repository at this point in the history
  6. feat(apiWatch): extract function that doesn't need to be in function …

    …body
    
    1. One variable less on the stack
    2. Smaller functions means less time to optimize
    basvanmeurs committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    9bd002b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3981a86 View commit details
    Browse the repository at this point in the history
  8. feat(effect): remove out-of-bounds check

    Out-of-bounds should be avoided always, for performance reasons. In practice, some benchmarks (especially 'write ref, read 1000 computeds') showed significant (30%) improvement after this change.
    basvanmeurs committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    de906b7 View commit details
    Browse the repository at this point in the history
  9. chore(effect): add comment to targetMap

    Explain that refs store their deps in a local property.
    basvanmeurs committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    295e46c View commit details
    Browse the repository at this point in the history
  10. feat(effect): refactor triggering for non-refs

    Improves performance.
    basvanmeurs committed Nov 16, 2020
    Configuration menu
    Copy the full SHA
    4ed374c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    911fde1 View commit details
    Browse the repository at this point in the history