Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

Optimizing the amount of watchers #105

Description

@koenvd

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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