Vuex mutations block the UI by default

I upload a csv file to webworker and then push chunks of about 600 items into a state in a loop:

mutations: {
 LOAD_ITEMS: (state, { items }) => {
  items.forEach(item => {
    Vue.set(state.items, item.id, item)
    state.lists.all.push(item.id)
    state.lists.active.push(item.id)
  })
 }
}

      

The timeline shows that adding material to the state is blocking the UI. So should I manage state mutations from a performance standpoint also myself?

Or is the vuex / vue state not designed for datasets of about 1000-7000 objects?

profile

+3
vuejs2 vuex


source to share


No one has answered this question yet

Check out similar questions:

116
Vuex Action Against Mutations
25
Vuex state on update page
7
Accessing getters in Vuex mutations
1
Vuex - state after mutation
0
Vuex mutation does not update state on load
0
vuex load subcomponents when mutating store state
0
Vue does not pass mutation to Vuex
0
Vuex is unresponsive when mutated
0
Vuex error: "Don't mutate vuex store state outside of mutation handlers."
0
Searching from Vuex observable property containing many lines is very slow



All Articles
Loading...
X
Show
Funny
Dev
Pics