Skip to content

Commit

Permalink
Don't buffer results of no formatters where applied
Browse files Browse the repository at this point in the history
A small memory optimization in the ORM
  • Loading branch information
lorenzo committed Sep 24, 2014
1 parent fb96aa7 commit fbe99ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Query.php
Expand Up @@ -814,7 +814,7 @@ public function autoFields($value = null) {
protected function _decorateResults($result) {
$result = $this->_applyDecorators($result);

if ($this->bufferResults()) {
if (!($result instanceof ResultSet) && $this->bufferResults()) {
$class = $this->_decoratorClass();
$result = new $class($result->buffered());
}
Expand Down

0 comments on commit fbe99ff

Please sign in to comment.