I’m adding 4600 objects to my Vuex state as the user selects the data they wish to work with. I’m using Vue.set() as prescribed in the documentation. The Vue.set() is very slow - on the order of 100 seconds for the 4600 objects. Each object contains 3 ints and a bool. Am I doing something wrong or ?
const state = {
someObjs: {},
someOtherObjs: {}
}
mutations.ADD_SOMEOBJ = function(state,someObj)
{
Vue.set(state.someObjs,someObj.id,someObj);
}
actions.addSomeObjs = function(context,payload)
{
getObjsFromServer(payload,function(objs)
{
var i;
for (i = 0; i < objs.length; i++)
context.commit("ADD_SOMEOBJ",objs[i]);
});
}