Skip to content

git: Remove unnecessary block map recomputation when splitting SplittableEditor#49075

Merged
cole-miller merged 2 commits intomainfrom
unfold-intersecting-bottleneck
Feb 13, 2026
Merged

git: Remove unnecessary block map recomputation when splitting SplittableEditor#49075
cole-miller merged 2 commits intomainfrom
unfold-intersecting-bottleneck

Conversation

@cole-miller
Copy link
Member

We had a call to BlockMap::unfold_intersecting that ended up recomputing the entire block map for the RHS without spacers, only to throw it away in favor of the version with spacers a few lines down. Now we only sync each block map once in set_companion.

Release Notes:

  • Improved performance when toggling from the unified diff to the split diff.

Co-authored-by: Jakub <jakub@zed.dev>
Co-authored-by: Cameron McLoughlin <cameron.studdstreet@gmail.com>
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 12, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Feb 12, 2026
@cole-miller cole-miller enabled auto-merge (squash) February 13, 2026 15:42
@cole-miller cole-miller merged commit 73853be into main Feb 13, 2026
27 checks passed
@cole-miller cole-miller deleted the unfold-intersecting-bottleneck branch February 13, 2026 15:52
@cole-miller
Copy link
Member Author

/cherry-pick preview

@zed-zippy
Copy link
Contributor

zed-zippy bot commented Feb 13, 2026

🍒💥 Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/22000012857

cole-miller added a commit that referenced this pull request Feb 13, 2026
…tableEditor` (#49075)

We had a call to `BlockMap::unfold_intersecting` that ended up
recomputing the entire block map for the RHS _without_ spacers, only to
throw it away in favor of the version with spacers a few lines down. Now
we only sync each block map once in `set_companion`.

Release Notes:

- Improved performance when toggling from the unified diff to the split
diff.

Co-authored-by: Jakub <jakub@zed.dev>
Co-authored-by: Cameron McLoughlin <cameron.studdstreet@gmail.com>
cole-miller added a commit that referenced this pull request Feb 13, 2026
…itting `SplittableEditor` (#49075)" to v0.224.x (#49127)

Release Notes:

- Improved performance when toggling from the unified diff to the split
diff.

Co-authored-by: Jakub <jakub@zed.dev>
Co-authored-by: Cameron McLoughlin <cameron.studdstreet@gmail.com>
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 staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant