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

Handle observables memory-wise #340

Open
kettanaito opened this issue Nov 27, 2018 · 1 comment
Open

Handle observables memory-wise #340

kettanaito opened this issue Nov 27, 2018 · 1 comment
Labels
enhancement Enhances existing functionality. help wanted Extra attention is needed refactoring
Projects
Milestone

Comments

@kettanaito
Copy link
Owner

kettanaito commented Nov 27, 2018

What:

  • Need to ensure duplicate observables are not registered for the same purpose
  • Need to flush observable instances that are no longer relevant to the current state of a form
  • (Optional) Optimize existing reactive transformation chains to ensure top performance

Why:

To prevent memory leaks due to a bunch of observables established.

How:

  • Store the established observables in a Map, associated with the reason of observation and keyPath of the issuer. Re-occuring prompts to create an observer for the same reason and the same issuer can be looked up in the storage, and prevented
@kettanaito kettanaito added enhancement Enhances existing functionality. refactoring labels Nov 27, 2018
@kettanaito kettanaito modified the milestones: 1.x, Optimization Nov 27, 2018
@kettanaito
Copy link
Owner Author

It may be useful to keep the records of created observables in the form's state. This way whenever a field is registered, and prompts to create an observable, it can look up itself (based on fieldPath) in the form's state, to see if such observable already exists.

This needs to be aligned with the kinds of observables established (rules observer, props observer).

@kettanaito kettanaito added this to In progress in Roadmap Dec 11, 2018
@kettanaito kettanaito moved this from In progress to In scope in Roadmap Dec 13, 2018
@kettanaito kettanaito added the help wanted Extra attention is needed label Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances existing functionality. help wanted Extra attention is needed refactoring
Projects
Roadmap
  
In scope
Development

No branches or pull requests

1 participant