Skip to content

Disable Electron spellcheck and background throttling - #2

Merged
Guitaraholic merged 1 commit into
mainfrom
fix/electron-spellcheck-throttling
Sep 2, 2026
Merged

Disable Electron spellcheck and background throttling#2
Guitaraholic merged 1 commit into
mainfrom
fix/electron-spellcheck-throttling

Conversation

@Guitaraholic

@Guitaraholic Guitaraholic commented Sep 2, 2026

Copy link
Copy Markdown

Human comments

What was wrong

The desktop shell is Chromium in front of a Node server. Spellcheck walks the DOM on every input event; bb is a control plane, not a document editor. With backgroundThrottling on, Chromium pauses timers in an occluded window, so token streams, reconnect, and query refetch stall.

Related: get-bb/bb#2693 (Chromium main-thread cost). This PR is the two window prefs we can flip without rewriting input handling.

What changed

  • webPreferences.spellcheck: false and session.setSpellCheckerEnabled(false) on window create and context-menu register.
  • webPreferences.backgroundThrottling: false.

No protocol change. Remote-first startup was already correct (a saved Connect / custom URL skips initializeRuntime) and is not touched here.

Why this way

get-bb#2693 is broader (EventTimingProcessingEnd when input events accumulate). Turning spellcheck off removes a known DOM walk on every keystroke. Disabling background throttling keeps the control plane alive when the window is covered. Both are one-line Electron prefs.

We did not try to fix Chromium event-timing itself, and we did not change how the renderer schedules React work. Those are larger cuts.

Benefit to bb

Packaged desktop only. Less main-thread work per keystroke in the prompt box; a covered window still paints incoming tokens. Web is unchanged.

Harvest

Independent. Already opened: get-bb/bb#2934.

Decision record: docs/perf-control-plane.md (PR #9).

How you verified

  • apps/desktop/test/desktop-window-factory.test.ts and desktop-context-menu.test.ts expect spellcheck: false, backgroundThrottling: false, and setSpellCheckerEnabled(false). 17 passed.

Related: get-bb#2693, get-bb#2934

AGENT GENERATED

bb is a control plane, not a document editor. Spellcheck walks the DOM
on input. Background throttling pauses token streams and query refetch
when the window is occluded.

Fixes get-bb#2693
@Guitaraholic
Guitaraholic merged commit 5c4a6b9 into main Sep 2, 2026
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