[bug] #317 Added jsdoc note about performance

This commit is contained in:
Henry 2015-11-18 12:14:00 -08:00
parent 40b21e35fd
commit 5ced8e655d

View File

@ -156,6 +156,13 @@ define(
});
};
/**
* Returns the default model for an object of this type. Note that
* this method returns a clone of the original model, so if using this
* method heavily, consider caching the result to optimize performance.
*
* @return {object} The default model for an object of this type.
*/
TypeImpl.prototype.getInitialModel = function () {
return JSON.parse(JSON.stringify(this.typeDef.model || {}));
};