sequelize/sequelize — pull request #830 by joshm (2013-08-13 16:53:24+00:00)
Title: Doing a deep clone on includes/dao objects can be very slow in findAndCountAll

When running tests on the new findAndCountAll we found that when we had multiple includes in the options, the cloneDeep call could get very slow, like 5-10 seconds slow. This keeps this from occurring, I believe all the options that can currently go into the count call are really the where and group queries.

I did not provide an extra test for this, the current tests cover the basic semantics.