Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Zed 3 min read Incident mediumAdept

Fixing the Git Blame Beachball

Committing with many files open froze Zed for about 10 seconds. Instruments' Thread State and Narrative views showed the main thread stuck in a condition-variable wait and repeatedly woken by git. The cause was Inline Git Blame: it listened for git index changes in every open buffer, so one commit spawned 257 concurrent git processes. A priority inversion made it worse, because the 5ms block_with_timeout depended on a GPUI timer task scheduled below background tasks, so the main thread waited seconds instead of milliseconds. Both bugs were fixed in v0.133.7.

Assumes: condition variablesthread prioritiesmacOS profiling basics

Related posts

  • Zed Weekly: #23

    Zed mediumAdept

    Zed's weekly team update covers a fix for typing lag with autocomplete. Completion re-filtering was offloaded to background workers, but a higher-level callsite blocked the UI thread waiting on that future, so the re-filter now runs without blocking and races the re-request to the language server. Other items: UI components migrated to the latest GPUI with stories now living beside each component, GPUI 2's stateless element model requiring IDs on stateful elements such as click handlers, prettier and Vue.js integration in the next preview, Universal Links, channel permissions and a notifications panel.

  • Zed Weekly: #29

    Zed mediumAdept

    Zed's port to GPUI 2 is nearing daily usability, and the team is focused on frame-rendering performance measured by holding tab-switch at 60Hz key repeat. Because every element is a boxed trait object, they replaced malloc with a custom thread-local bump arena that enforces safety dynamically instead of via lifetimes, and changed `Element::paint` to take `&mut self` to avoid heap-to-stack copies. The target is full-window redraws under 4ms on an M1, with view caching planned next. Other updates cover a better VS Code theme importer, focus handlers moved to run after each frame draw to fix a split-pane focus bug, and a port of the feedback UI.

  • May 18 Replit downtime

    Replit mediumAdept

    A latent Go bug leaked RWMutex read-locks whenever a configuration kind had no handler. The first write-lock attempt, during a configuration push to all clusters at once, deadlocked every Repl VM and caused about two hours of total downtime. Recovery was slowed by liveness probes that failed open, a rollback that took two tries and reset the added capacity, and an autoscaler that ignored request volume and shrank instance groups. Fixes include fast, reliable rollbacks, staggered config rollouts with jitter, self-healing health and liveness logic, and more static analysis.

  • Split Diffs are Here

    Zed easyNovice

    Zed v0.224 makes split diffs the default, built on its multibuffer model where all changed files form one editable surface. The left side reuses the old file version with deleted hunks highlighted, keeping its syntax tree and line numbers. The block map inserts spacers that keep both sides aligned on every keystroke. Profiling large diffs produced broader wins than the split-diff-specific work: block map fixes also sped up project search, and switching from fork/exec to posix_spawn on macOS reduced main-thread hangs from git blame and other external processes.

  • This Week at Zed Industries: #1

    Zed mediumAdept

    Zed grew out of Xray, the experimental editor Nathan Sobo and Antonio worked on at GitHub in 2018, and this weekly update recaps the path from there to a company and a private alpha. It also describes the team's first "quality week" of bug fixing, which they plan to repeat every six weeks. Multibuffer performance in project-wide search got much faster after two fixes. Rope fingerprints, computed with the monoid-homomorphic bromberg_sl2 hash and aggregated through a B-tree, are now stored as HashMatrix values instead of allocated Strings. Excerpts are also built on a background thread and streamed into the multibuffer so the main thread no longer blocks.

The quest for software engineering knowledge.

Look:
Layout: