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

refactor(multiCheckBox): Improve performance#66

Open
blowsie wants to merge 1 commit into
formly-js:masterfrom
blowsie:patch-1
Open

refactor(multiCheckBox): Improve performance#66
blowsie wants to merge 1 commit into
formly-js:masterfrom
blowsie:patch-1

Conversation

@blowsie

@blowsie blowsie commented Nov 3, 2015

Copy link
Copy Markdown
  • Improve performance by moving $watch to the exact model

- Improve performance by moving $watch to the exact model

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What this will do is essentially create a new watcher every time the model changes. Probably not something we want to do...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I can see this could be an issue, but maybe your missing that this code is already in the repo?

With the way it is pre my changes, this watcher is created every time any section of the form model changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awe dang, you're right! Hmmm... We should probably fix that... I'll create an issue.

@kentcdodds

Copy link
Copy Markdown
Member

Sorry, I appreciate what you're trying to do, but I don't think that this will work well. Have you noticed perf issues with this watcher?

@blowsie

blowsie commented Nov 4, 2015

Copy link
Copy Markdown
Author

Well, I just noticed on large forms that this is being called 100s or 1000s of times and sometimes the multiCheckBox is not even being touched.

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 this pull request may close these issues.

2 participants