Skip to content

v1.5.3: FSEvents watch loop performance fixes

Latest

Choose a tag to compare

@dhruv-anand-aintech dhruv-anand-aintech released this 25 May 18:27
· 23 commits to main since this release

⚡ Performance

Daemon CPU usage reduced from ~40% sustained to ~2% idle.

Root causes fixed

  • Home directory FSEvents~/.cursorrules sits directly in ~, causing watchdog to observe the entire home directory recursively. Every Claude transcript append, atuin history write, and cache update fired into the event queue. Fixed by skipping Path.home() as a watch root.
  • Write-loop — sync writes to skill/settings destination paths, FSEvents picks those up before watch state is refreshed, re-triggers sync immediately. Fixed by draining the event queue after each sync.
  • Expensive skill hashing_skill_dir_hash was calling read_bytes() on every file in every skill dir every 3 seconds. Replaced with mtime+size stat — same change detection, no file reads.
  • Transcript FSEvents~/.claude/projects/ and ~/.codex/sessions/ were watched by FSEvents; active sessions write every few seconds, each triggering a 360ms rglob. Moved history sync to a 60s periodic timer.