不要怂,就是干,撸起袖子干!

Commit ba3cfab3 by joshm

Doing a deep clone on includes/dao objects can be very slow

1 parent 74f3420d
Showing with 6 additions and 4 deletions
......@@ -354,13 +354,15 @@ module.exports = (function() {
DAOFactory.prototype.findAndCountAll = function(options) {
var self = this
, opts = Utils._.cloneDeep(options)
, copts = Utils._.extend({}, Utils._.cloneDeep(options) || {}, {
// no limit, offset, order or include for the options given to count()
, copts = Utils._.omit(options, ['offset', 'limit', 'order', 'include', 'attributes'])
copts = Utils._.extend({}, Utils._.cloneDeep(copts) || {}, {
// no limit, offset, order, attributes or include for the options given to count()
offset : 0,
limit : 0,
order : null,
include : null
include : null,
attributes: [],
})
return new Utils.CustomEventEmitter(function (emitter) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!