UnionOfRAD/lithium — pull request #1144 by warrenseymour (2014-10-18 19:59:07+00:00)
Title: Optimise assignTo call in DocumentSet::_set()

Calling method_exists() against $data when it is not an object triggers an autoloader lookup, which in turn calls realpath().

When initialising large data sets, this can bring a heavy IO burden.

Since assignTo() is always called against an object instance, we can safely prevent a call to method_exists() if $data is not an object.