feat(#2392): group boot sweep + reconciles under one boot dag
This commit is contained in:
parent
6e0f6893cf
commit
16f69ca890
6 changed files with 111 additions and 23 deletions
|
|
@ -215,11 +215,21 @@ function renderRebuildQueue(s) {
|
|||
}
|
||||
orderedLis.push(li);
|
||||
}
|
||||
for (const top of tops) {
|
||||
addEntry(top, false);
|
||||
for (const child of childrenOf.get(top.id) || []) addEntry(child, true);
|
||||
// Render each root followed by its whole subtree, depth-first. Recursion
|
||||
// (rather than a single level of children) handles nested fan-outs such as
|
||||
// the boot DAG: a `boot` root anchors the `startup_sweep` child, which itself
|
||||
// fans out `rebuild` grandchildren — all of which must appear under the one
|
||||
// boot tree. `visited` guards against re-rendering a node reached twice and
|
||||
// any malformed parent cycle.
|
||||
const visited = new Set();
|
||||
function addTree(entry, isChild) {
|
||||
if (visited.has(entry.id)) return;
|
||||
visited.add(entry.id);
|
||||
addEntry(entry, isChild);
|
||||
for (const child of childrenOf.get(entry.id) || []) addTree(child, true);
|
||||
}
|
||||
for (const o of orphans) addEntry(o, true);
|
||||
for (const top of tops) addTree(top, false);
|
||||
for (const o of orphans) addTree(o, true);
|
||||
|
||||
const liveIds = new Set(queue.map((e) => e.id));
|
||||
for (const [id, entry] of rebuildQueueRowCache) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue