diff --git a/main.py b/main.py index fba1ef17..716384f9 100644 --- a/main.py +++ b/main.py @@ -513,8 +513,14 @@ def _reload_dirs() -> list[str]: for entry in sorted(root.iterdir()): if not entry.is_dir() or entry.name.startswith(".") or entry.name in _RELOAD_SKIP: continue - # 의존성 트리가 **한 겹 아래에 숨어 있는** 경우도 뺀다 — `B07_DesignDetail/openwebcad/ - # node_modules`(15,944개)가 그렇다. 바로 밑만 보면 새어 나간다(2026-09-07 실측). + # 링크(정션)는 통째로 건너뛴다. `node_modules` 안에 **저장소 루트를 되가리키는 정션**이 + # 있어(`B07_DesignDetail/openwebcad/node_modules/forest-road-webapp` → 저장소 루트, + # npm 이 만든 것) 리로더가 그리로 되돌아가 `venv`·`storage` 를 다시 훑고 또 되감겼다. + # 실측(2026-09-07) — 감시 폴더를 훑으면 파일 **486,809개**, 한 바퀴 **1,045초**. + # 파이썬 `rglob` 은 정션을 따라 들어가고 PowerShell 은 안 따라가 눈으로는 안 보였다. + if entry.is_symlink(): + continue + # 의존성 트리가 **한 겹 아래에 숨어 있는** 경우도 뺀다 — 위 정션이 그 안에 있었다. if (entry / "node_modules").is_dir() or any(entry.glob("*/node_modules")): continue if any(entry.rglob("*.py")):