mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 15:02:23 +00:00
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:
parent
77c399f2a2
commit
2979ee90a3
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user