-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
Description
Vue.js version
2.2.0
Older versions have this issue too.
Reproduction Link
https://jsbin.com/sujuwabufi/3/edit?html,js,output
Steps to reproduce
The steps must be in order. If any step is skipped or the order is changed the bug does not appears.
- Register a global component. The component has to have a watcher, watching a data property or a prop.
- Create a Vue instance and attach it to an element in a dom.
- Create/get a data set and put it in a shared state. (global object)
- Create a new Vue instances with the following criteries and attach it to an element in the dom.
- The shared state has to be reactive in this instance (put it into the instances data property)
- The instance has to watch the shared state with a deep watcher.
- The instance needs a computed property returning any value.
- The instance needs a computed property returning a value based on the shared state object.
- Mutate the shared state. (repro case test button )
What is Expected?
App does not freeze.
What is actually happening?
The app freezes for several seconds, depend on how big the data set is. The reason behind this is change detection triggered for every object in the data set but it should only for the watcher one time and for the computed property one time.
One thing to note is this only happen one time after the first mutation. After that everything work as intended.
HerringtonDarkholme