backbone-nested icon indicating copy to clipboard operation
backbone-nested copied to clipboard

_setAttr function performance issue for large dataset

Open dpmragu opened this issue 8 years ago • 0 comments

I have a model which contains the nested model( like 3 l sub level).When this model has large dataset it takes a lot of time to finish execution. I found that the _setAttr function, especially the following code, take a long time for execution in the backbone-nested.js

following lines take a long time for execution in the backbone-nested.js file.

for (var a in obj) { if (obj.hasOwnProperty(a)) { nestedAttr = prefix + '.' + a; nestedVal = obj[a]; if (!_.isEqual(model.get(nestedAttr), nestedVal)) { model._delayedChange(nestedAttr, nestedVal, opts); } if (_.isObject(nestedVal)) { checkChanges(nestedVal, nestedAttr); } }}``

Could you please help me to resolve this issue?

dpmragu avatar Jun 24 '17 02:06 dpmragu