mirror of
https://github.com/stablyai/orca.git
synced 2026-10-19 16:03:26 +00:00
routeSshFilesystemWatchNotification called isPathInsideOrEqual(root, path) for every (registration x event) pair, and that helper NFC-normalizes both sides. So each event path was re-normalized once per watch root -- O(roots x events) normalizations for O(roots + events) distinct work. Normalize each event path once up front and build one pre-normalized matcher per root, leaving only string compare in the inner loop. 8.3x on a 25-root x 5,000-event checkout storm (93ms -> 11ms of main-process blocking); 3.6-4.0x on a typical 3-root x 20-event save. Co-authored-by: Orca <help@stably.ai>