Skip to content

Commit d13d662

Browse files
committed
fix(logs): use pop() for O(1) dequeue in folder BFS
1 parent b345cb2 commit d13d662

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/lib/logs/filters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export async function expandFolderIdsWithDescendants(
162162
const expanded = new Set<string>(seedIds)
163163
const queue = [...seedIds]
164164
while (queue.length > 0) {
165-
const current = queue.shift() as string
165+
const current = queue.pop() as string
166166
const children = childrenByParent.get(current)
167167
if (!children) continue
168168
for (const childId of children) {

0 commit comments

Comments
 (0)