Revert "[Search] Don't trigger digest cycles while indexing"

This reverts commit 4b8a5ac0b257737ee33effc966816afca6c11b94.
Performance measurements indicates this is harmful for performance,
although this is not well-explained.
This commit is contained in:
Victor Woeltjen 2015-09-29 14:59:49 -07:00
parent 77c399f2a2
commit 2979ee90a3

View File

@ -126,13 +126,23 @@ define(
indexItem(node);
indexed[id] = true;
// If this node has children, index those
if (node && node.hasCapability && node.hasCapability('composition')) {
// Make sure that this is async, so doesn't block up page
$timeout(function () {
// Get the children...
node.useCapability('composition').then(indexItems);
}, 0, false);
node.useCapability('composition').then(function (children) {
$timeout(function () {
// ... then index the children
if (children.constructor === Array) {
indexItems(children);
} else {
indexItems([children]);
}
}, 0);
});
}, 0);
}
});
}