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

Optimizing the amount of watchers #105

Open
koenvd opened this issue Dec 12, 2016 · 0 comments
Open

Optimizing the amount of watchers #105

koenvd opened this issue Dec 12, 2016 · 0 comments

Comments

@koenvd
Copy link

koenvd commented Dec 12, 2016

I noticed that angular-winjs does create redundant watchers for the properties that as a user I'm not interested in.

Eg like if I define a menu command like:
<win-menu-command label="ladadi ladada" </win-menu-command>

due to the way the api & bindings are created I will end up with 10 watchers for this element.

See https://github.com/winjs/angular-winjs/blob/master/js/angular-winjs.js#L253 where the bindings & watchers are created.

This can cause the number of watchers become very large impacting the speed of the app I'm making.

Therefore I was wondering if we can avoid the step for not creating a watcher per property? And what would be the best way to achieve that without breaking backwards compatibility?

Could we do something like
<win-menu-command freeze label="ladadi ladada" </win-menu-command>
where freeze would indicate to only create a watcher for the specified attributes?

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

No branches or pull requests

1 participant