mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-05 20:45:45 +08:00
The project file-tree endpoint walked children sequentially with `await fsPromises.stat()` inside a for-loop plus a separate `fsPromises.access()` probe before recursing. On high-latency filesystems (NFS/SMB) every one of those round-trips was serialized, so a 120k-file SMB-mounted project took ~2 minutes to load. This change: * Runs stat() and recursive getFileTree() calls in parallel via `Promise.all` — pipelines round-trips and lets subtree traversals overlap. * Drops the redundant access() probe; any EACCES now surfaces from readdir's own try/catch in the recursive call, saving one RTT per directory. * Extracts the hardcoded skip list into an IGNORED_DIRS Set and extends it to cover common Python / Rust / JVM / IDE build artefacts (.next, __pycache__, .pytest_cache, .tox, .venv, target, .gradle, .idea, coverage, etc). No API shape change; existing consumers get the same tree structure, only much faster on large or remote-mounted projects.