-
Stabilise process I/O buffers (watcher.odin:454-505)
- Persist stdout/stderr byte slabs and OVERLAPPED structs inside
ProcessIOStateinstead of reallocating them every poll tick. - Reset lengths/events instead of allocating to keep CPU caches hot and eliminate allocator churn.
- Measure: expect fewer heap calls per second, steadier RSS, and lower latency in tight watch loops.
- Persist stdout/stderr byte slabs and OVERLAPPED structs inside
-
Batch decode directory notifications (watcher.odin:556-600)
- Treat the
ReadDirectoryChangesWblock as a struct-of-arrays batch (actions, offsets, lengths, hashes). - UTF-8 convert and filter only the rows that survive extension checks to cut string work on ignored files.
- Treat the
-
Preparse build templates (watcher.odin:603-677)
- Parse
arg_info.build_templateonce into literal spans + placeholder descriptors. - Assemble commands via memcpy of literals plus direct insertion of dynamic spans (file/out/target), eliminating per-trigger splits and joins.
- Parse
-
Hash-based filename filters (watcher.odin:570-589)
- Replace repeated
strings.has_suffix/containscalls with a small hashed table or bitset of skip/build extensions. - Express state as membership in these tables to keep the hot filtering path branch-light and cache-resident.
- Replace repeated