Skip to content

perf(macOS): scope workbench refresh and add FPS monitor - #138

Merged
1lck merged 3 commits into
preview/0.3.0from
perf/macos-scoped-refresh
Aug 17, 2026
Merged

perf(macOS): scope workbench refresh and add FPS monitor#138
1lck merged 3 commits into
preview/0.3.0from
perf/macos-scoped-refresh

Conversation

@1lck

@1lck 1lck commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

macOS workbench updates were fanning out through AppModel, so typing, caret movement, Git refresh, and language diagnostics rebuilt the whole window.

This PR keeps file watching and Git refresh, but applies each event to the surfaces that actually change:

  • Isolate caret, selection, and Find in File on EditorChromeModel
  • Isolate diagnostics on EditorDiagnosticsStore so LSP publish storms do not rebuild the workbench
  • Make CodeEditorView incremental: dirty-range highlight, line-index edits, deferred decorations/LSP sync
  • Rebuild Git tree status as a path index and refresh project-tree rows only when the snapshot changes
  • Stop inactive project sessions from waking the window chrome
  • Add a status-bar FPS monitor next to memory usage

How to verify

  1. Open a medium or large file and type quickly / hold arrow keys. FPS in the status bar should stay closer to 60 on a 60 Hz display.
  2. Edit an already-open file from another tool. The editor should still reload; the whole window should not hitch on every write.
  3. Open Find in File and type. Only the find bar and match highlights should update.
  4. Confirm Git color badges still update after workspace edits.

./scripts/test-macos.sh and ./scripts/verify-service-boundaries.sh were run locally.

Known follow-ups

  • Markdown preview may not live-update after the first dirty keystroke, because document text no longer publishes on every already-dirty edit.
  • Menu-bar Find Next/Previous enablement can lag because those items still read through AppModel.
  • LSP log panes may wait for a session-state change before refreshing.

1lck added 3 commits August 17, 2026 19:45
Stop caret, find, diagnostics, and project-tree updates from rebuilding
the whole window. Keep file watching and Git refresh, but apply them to
the surfaces that actually change. Add a status-bar FPS readout so
typing jank is visible.
Button and context-menu closures are not MainActor-isolated under the
CI Swift 6 check. Hop back to AppModel from nonisolated action methods
instead of marking the helper class itself MainActor.
@1lck
1lck merged commit 1a965d5 into preview/0.3.0 Aug 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant