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


source to share





All Articles