ngneat / forms-manager

🦄 The Foundation for Proper Form Management in Angular
https://www.netbasal.com
MIT License
518 stars 29 forks source link

Slow to update state? #21

Closed ivanmayes closed 3 years ago

ivanmayes commented 3 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ x] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

I have a project with akita and the forms-manager. I feel like I'm using it fairly simply, but there is a noticeable roughly 1 second lag between patching a value and seeing the change manifest down through the .valueChanges observable. Attached code and behavior video below. No clue what I could be doing to see such an issue in performance.

Environment


Angular version: 9.1.2


Browser:
- [ x] Chrome (desktop) version 86
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

image

Nested component:

image image Screen Recording 2020-10-20 at 9.04.58 PM.mov.zip

NetanelBasal commented 3 years ago

I think it's because we apply a debounceTime.

ivanmayes commented 3 years ago

That was it! Applying { debounceTime: 0 } fixed the issue. Thanks!