Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
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

Description

@pjfsilva

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions