Commit a2bb2e0
perf(ui): cap initial file-tree fetch at depth 8 on dashboard (#119)
Dashboard.tsx called `api.getFileTree()` with no depth, so the backend
returned the full tree (capped only by the 10 K maxFiles limit). On a
200 K-node graph that's ~2-4 MB of JSON shipped to the browser on every
cold load, even though ECharts treemap only renders one level at a time
and drilling is client-side.
Cap initial fetch at depth 8 — enough for a fully-qualified Java path
(`src/main/java/io/github/<org>/<pkg>/<sub>/File.java` = 8 segments) and
the typical TS/Python/Go layouts. Past depth 8 the directory renders as
a leaf with its aggregate node count; on-demand subtree fetching for
deeper drilling is a follow-up if real workloads need it.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4b7cb45 commit a2bb2e0
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
212 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
213 | 218 | | |
214 | 219 | | |
215 | 220 | | |
| |||
0 commit comments