SF Bug #3391046 - Loading entries with many attributes is very slow

This commit is contained in:
Deon George 2011-10-06 11:06:43 +11:00
parent 4089ffa9fe
commit 059b83befb
3 changed files with 7 additions and 3 deletions

View File

@ -97,6 +97,9 @@ class PageRender extends Visitor {
$this->visit('',$attribute);
}
// Sort our attribute values for display.
$this->template->sort();
}
}

View File

@ -1563,5 +1563,9 @@ class Template extends xmlTemplate {
public function isNoLeaf() {
return $this->noleaf;
}
public function sort() {
usort($this->attributes,'sortAttrs');
}
}
?>

View File

@ -447,9 +447,6 @@ abstract class xmlTemplate {
else
debug_dump_backtrace(sprintf('There was a request to add an attribute (%s), but it was already defined? (%s)',$attrid,__METHOD__),true);
if ($this->getID() == 'none')
usort($this->attributes,'sortAttrs');
return $attribute;
}