Repository navigation
Closed
Labels
effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workepic/opencode-platformEpic: opencode-platform - all issues of this effort carry itEpic: opencode-platform - all issues of this effort carry itkind/performancePerformance problem or optimizationPerformance problem or optimizationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientNice to have; do when convenientsource/humanFiled directly by a humanFiled directly by a human
Description
Question
What does OPENCODE_EXPERIMENTAL_FILEWATCHER actually cost at runtime, and is it better or worse than the default watcher? We currently ship OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=1 in user config (large trees everywhere); this issue tracks replacing gut feel with measurements.
Background
- Default watcher: watches the project tree — powers live external-edit awareness, @-mention freshness, snapshot/revert accuracy, live file tree, LSP refresh. (Diffs themselves are git-based and work regardless.)
- Experimental watcher: watches the entire directory tree, not just the project. The desktop app enables it by default.
- Suspected costs on very large trees: inotify watch count, event churn, CPU/IO, memory — especially with node_modules-scale subtrees, .git, and huge monorepos.
Benchmarks needed (this is the deliverable)
Design and run benchmarks that answer, for default vs experimental vs disabled:
- Idle CPU and RSS on trees of increasing size (1k / 50k / 500k files), including a tree with node_modules and a large .git.
- Event latency: time from an external file edit to the session/UI reflecting it.
- Behavior at the inotify watch limit (
fs.inotify.max_user_watches): graceful degradation or silent staleness? - Cost under churn: bulk operations (git checkout of a big branch, codegen, package install) — event storm handling, CPU spike, dropped events.
- Network filesystems and containers: where OS notifications don't exist or lie.
- Battery/laptop impact on a real workstation over a workday (subjective + sampled CPU).
What to test exactly
- Correctness parity: does experimental catch edits the default misses (outside-project files), and does either miss edits the other catches?
- Whether experimental is more performant anywhere (batching, native recursive watch) or purely broader in scope.
Outcome wanted
A table of measured results + a recommendation per environment class (laptop / desktop / server / container) for which watcher setting to ship, so the config flags stop being guesses.
Acceptance criteria
- A benchmark harness exists that runs default vs experimental vs disabled watcher over at least three tree sizes (incl. node_modules-scale and a large .git) and records idle CPU/RSS and edit-to-reflection latency.
- Behaviour at the inotify watch limit is measured and recorded (graceful degradation vs silent staleness).
- Results are posted on this issue as a table, with a per-environment-class recommendation (laptop / desktop / server / container) for which watcher setting to ship.
- The user-config
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=1gut-feel default is either confirmed by the data or changed per the recommendation.
Metadata
Metadata
Assignees
Labels
effort/mMedium: expected under 1 day of workMedium: expected under 1 day of workepic/opencode-platformEpic: opencode-platform - all issues of this effort carry itEpic: opencode-platform - all issues of this effort carry itkind/performancePerformance problem or optimizationPerformance problem or optimizationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/lowNice to have; do when convenientNice to have; do when convenientsource/humanFiled directly by a humanFiled directly by a human
Activity
dezren39 commentedon Oct 26, 2026
Intake review
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=1on gut feel — the exact state the issue was filed to replace with measurements. Acceptance criteria appended this run convert the issue's benchmark list and "outcome wanted" into checkable items.— Fleet monitor intake enrichment, 2026-10-26 run; verified against current opencode main
c792e04fe0this run.dezren39 commentedon Oct 28, 2026
Triage verdict: CONFIRMED — measurement gap live, routed as an investigation (queue task 2081)
Verified on current main
b0633cc697760085022fb5656ed92fac9ce49b9c(2026-10-28):packages/core/src/filesystem/watcher.ts(@parcel/watcher withnode:fsfallback, inotify backend on Linux),location-watcher.ts,packages/schema/src/config/watcher.ts,packages/app/src/workspaces/files/watcher.ts, plus unit tests (watcher.test.ts,location-watcher-policy.test.ts). Both flags are documented public surface (packages/web/src/content/docs/*/cli.mdx:OPENCODE_EXPERIMENTAL_FILEWATCHER,OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER).OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=1default is exactly as unmeasured as when this was filed.Routing: the deliverable is measurements, not a code change, so this is enqueued as a
ci_investigation— queue task 2640: build a repeatable harness and measure default vs experimental vs disabled on the laptop (sandbox numbers would be meaningless) over 1k/50k/500k-file trees incl. node_modules-scale and large-.git cases — idle CPU/RSS, edit-to-reflection latency, inotify-limit behavior, churn cost — then post the table + per-environment recommendation here. Items 5–6 (network filesystems, workday battery) are excluded as the expensive tail, per the intake note.51 remaining items
dezren39 commentedon Nov 16, 2026
🤖 Agent note · blocked — escalated to user
dezren39 commentedon Nov 16, 2026
Agent note - done: decision was already answered; dead-name default dropped and merged