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

Feature: Maximum depth to $watch / $watchCollection #4591

Open
caitp opened this issue Oct 22, 2013 · 4 comments
Open

Feature: Maximum depth to $watch / $watchCollection #4591

caitp opened this issue Oct 22, 2013 · 4 comments

Comments

@caitp
Copy link
Contributor

caitp commented Oct 22, 2013

I've got a set of directives which deal with a tree structure. The tree structure is represented by an object with a property containing child objects with the same structure (that's fairly obvious).

So, this is great and all, but $watchCollection and $watch have a bit of a problem, because given that the model is nested, and each node deals with a particular (possibly) non-leaf branch of the tree, then for a tree with many levels, the $watching can become quite expensive.

I propose that the depth of checks be limit-able, so that non-leaf nodes don't end up checking a whole bunch of stuff in the model that they don't need to (since those checks will be performed elsewhere anyways).

I'm happy to put together a patch to do this, but I'm interested in hearing if it's a desirable feature or not.

@IgorMinar
Copy link
Contributor

I'm not a fan of this.

@caitp do you still care about this feature? if not, can we close this issue and the PR?

@caitp
Copy link
Contributor Author

caitp commented Oct 1, 2014

I think it would be useful to have it

@caitp
Copy link
Contributor Author

caitp commented Oct 1, 2014

up to you though

@petebacondarwin
Copy link
Contributor

I don't understand why $watchCollection does not provide the facility you need @caitp. Can you elaborate? In the meantime, moving to the IceBox.

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

No branches or pull requests

5 participants