# Index the folder tree once per library build · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/1625ddcd1c604be9c6f7a50b4b93151b385e71fd)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: 1625ddcd1c604be9c6f7a50b4b93151b385e71fd

Requested commit: 1625ddcd1c604be9c6f7a50b4b93151b385e71fd

Commit: 1625ddcd1c604be9c6f7a50b4b93151b385e71fd

Tree: e3d3925160d8b08f5f9bd4a73a8143d25c423241

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Index the folder tree once per library build

Each folder card rescanned every folder and strategy to find its subtree,
twice, and counted its child folders by scanning every folder again. The
library root of a big library paid that once per folder card on every
rebuild. Build a parent-to-children index once per build and read each
card's subtree from it. Cloud folder cards count child folders from one
pass over the tree too.

compareFoldersForSort had no callers left (sortLibraryFolders sorts on the
precomputed lastUpdated), so it goes with the scans it used.

```

## Parents

- [811c2d23805440c7ab089e99bc1b7ad2bce4cd4a](https://git.cafe/dara/icarus/commit/811c2d23805440c7ab089e99bc1b7ad2bce4cd4a?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/1625ddcd1c604be9c6f7a50b4b93151b385e71fd?format=markdown)
