Skip to content

linux: Spawn at least two background threads#44110

Merged
agu-z merged 1 commit intomainfrom
linux-min-2-bg-threads
Dec 4, 2025
Merged

linux: Spawn at least two background threads#44110
agu-z merged 1 commit intomainfrom
linux-min-2-bg-threads

Conversation

@agu-z
Copy link
Contributor

@agu-z agu-z commented Dec 4, 2025

Related to #44109, #43884, #43809.

In the Linux dispatcher, we create one background thread per CPU, but when a single core is available, having a single background thread significantly hinders the perceived performance of Zed. This is particularly helpful when SSH remoting to low-resource servers.

We may want to bump this to more than two threads actually, but I wanted to be conservative, and this seems to make a big difference already.

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 4, 2025
@zed-industries-bot

This comment was marked as resolved.

@agu-z agu-z force-pushed the linux-min-2-bg-threads branch from 3626c2b to 2d7e6de Compare December 4, 2025 10:32
@agu-z agu-z enabled auto-merge (squash) December 4, 2025 10:34
@agu-z agu-z merged commit 9db0d66 into main Dec 4, 2025
23 checks passed
@agu-z agu-z deleted the linux-min-2-bg-threads branch December 4, 2025 10:40
@agu-z
Copy link
Contributor Author

agu-z commented Dec 4, 2025

/cherry-pick preview

github-actions bot pushed a commit that referenced this pull request Dec 4, 2025
Related to #44109,
#43884,
#43809.

In the Linux dispatcher, we create one background thread per CPU, but
when a single core is available, having a single background thread
significantly hinders the perceived performance of Zed. This is
particularly helpful when SSH remoting to low-resource servers.

We may want to bump this to more than two threads actually, but I wanted
to be conservative, and this seems to make a big difference already.

Release Notes:

- N/A
zed-zippy bot added a commit that referenced this pull request Dec 4, 2025
… preview) (#44157)

Cherry-pick of #44110 to preview

----
Related to #44109,
#43884,
#43809.

In the Linux dispatcher, we create one background thread per CPU, but
when a single core is available, having a single background thread
significantly hinders the perceived performance of Zed. This is
particularly helpful when SSH remoting to low-resource servers.

We may want to bump this to more than two threads actually, but I wanted
to be conservative, and this seems to make a big difference already.

Release Notes:

- N/A

Co-authored-by: Agus Zubiaga <agus@zed.dev>
baldwindavid added a commit to baldwindavid/zed that referenced this pull request Dec 4, 2025
* main: (155 commits)
  Add support for git remotes (zed-industries#42819)
  python: Improve sorting order of toolchains to give higher precedence to project-local virtual environments that are within current subproject (zed-industries#44141)
  Use buffer language when formatting with Prettier (zed-industries#43368)
  search: Fix sort order not being maintained in presence of open buffers (zed-industries#44135)
  bedrock: Support global endpoints and new regional endpoints (zed-industries#44103)
  linux: Spawn at least two background threads (zed-industries#44110)
  macos: Add missing file access entitlements (zed-industries#43609)
  Re-colorize the brackets when the theme changes (zed-industries#44130)
  Reduce priority of Windows thread pool work items (zed-industries#44121)
  Update fancy-regex (zed-industries#44120)
  Prefer to disable options over hiding (git panel entry context menu) (zed-industries#44102)
  tab_switcher: Subscribe to workspace events instead of pane events (zed-industries#44101)
  editor: Add active match highlight for buffer and project search (zed-industries#44098)
  Add more preview tab settings and fix janky behavior (zed-industries#43921)
  ai: Add an eval for the inline assistant (zed-industries#43291)
  Fix circular reference issue around PopoverMenu again (zed-industries#44084)
  Run `git2::Repository::find_remote` in the background (zed-industries#44092)
  Improve support for multiple registrations of  `textDocument/diagnostic` (zed-industries#43703)
  Revert "http_client: Add integrity checks for GitHub binaries using digest checks (zed-industries#43737)" (zed-industries#44086)
  editor: Fix blame hover not working when inline git blame is disabled (zed-industries#42992)
  ...
AlpSha pushed a commit to AlpSha/zed that referenced this pull request Dec 5, 2025
Related to zed-industries#44109,
zed-industries#43884,
zed-industries#43809.

In the Linux dispatcher, we create one background thread per CPU, but
when a single core is available, having a single background thread
significantly hinders the perceived performance of Zed. This is
particularly helpful when SSH remoting to low-resource servers.

We may want to bump this to more than two threads actually, but I wanted
to be conservative, and this seems to make a big difference already.

Release Notes:

- N/A
CherryWorm pushed a commit to CherryWorm/zed that referenced this pull request Dec 16, 2025
Related to zed-industries#44109,
zed-industries#43884,
zed-industries#43809.

In the Linux dispatcher, we create one background thread per CPU, but
when a single core is available, having a single background thread
significantly hinders the perceived performance of Zed. This is
particularly helpful when SSH remoting to low-resource servers.

We may want to bump this to more than two threads actually, but I wanted
to be conservative, and this seems to make a big difference already.

Release Notes:

- N/A
someone13574 pushed a commit to someone13574/zed that referenced this pull request Dec 16, 2025
Related to zed-industries#44109,
zed-industries#43884,
zed-industries#43809.

In the Linux dispatcher, we create one background thread per CPU, but
when a single core is available, having a single background thread
significantly hinders the perceived performance of Zed. This is
particularly helpful when SSH remoting to low-resource servers.

We may want to bump this to more than two threads actually, but I wanted
to be conservative, and this seems to make a big difference already.

Release Notes:

- N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants