zed/crates/git_ui
Cole Miller a8cdf1d869
Batch excerpt insertions per file when opening commit view (#57330)
When viewing the diff for a commit where one of the files has a large
number (hundreds or thousands) of diff hunks, we can get a hang on the
main thread, since there's a large amount of work to recompute diff
transforms for thousands of excerpts. This PR makes it so that we batch
the addition of excerpts, with yield points in between batches so the UI
remains responsive.

We should have something similar for the project diff, but that's a bit
trickier; will address it in a separate PR.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Improved performance when opening the commit view with files that have
many diff hunks.
2026-05-25 14:42:01 +00:00
..
src Batch excerpt insertions per file when opening commit view (#57330) 2026-05-25 14:42:01 +00:00
Cargo.toml Add runtime diagnostics to git job queue debug dump (#57294) 2026-05-20 19:43:07 +00:00
LICENSE-GPL