Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng-model-options debounce seems to still trigger "dirty model checking" cycle #8814

Closed
pjfsilva opened this issue Aug 28, 2014 · 1 comment
Closed
Assignees

Comments

@pjfsilva
Copy link

I was expecting that the debounce option of ngModelOptions can be used to improve the performance by avoiding triggering too many watches on my page.

On my use case for example, I have a table where I apply 1 filter per cell (yes, I know I can optimize that) and 1 form with some input fields. Without using debounce for every keypress on an input field all my filters are executed which is a big no-no.
From my tests it seems that the debounce works correctly by only updating the model "after the debounce". The problem is that I still see the filters being called on every keypress which is something I wasn't expecting.

Steps to reproduce:

  1. Go to http://plnkr.co/edit/CHX2kA
  2. Open developer tools to see console.log output
  3. Type something on the input field: I was expecting that the filter used on the page was only executed when the debounce "finishes" and the model is updated but it is still called for every keypress.

Tested on angular v1.3.0-beta.19

tbosch added a commit to tbosch/angular.js that referenced this issue Sep 3, 2014
This change means that anyone watching `$viewValue` will no longer see the update immediately for debounced updates.

Closes angular#8814
tbosch pushed a commit to tbosch/angular.js that referenced this issue Sep 3, 2014
This change means that anyone watching `$viewValue` will no longer see the update immediately for debounced updates

Closes angular#8814
tbosch pushed a commit to tbosch/angular.js that referenced this issue Sep 3, 2014
This change means that anyone watching `$viewValue` will no longer see the update immediately for debounced updates

Closes angular#8814
@caitp caitp added this to the 1.3.0-rc.1 milestone Sep 3, 2014
@caitp
Copy link
Contributor

caitp commented Sep 3, 2014

Moving to same milestone as fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants