Skip to content

language: Defer dropping the SyntaxSnapshot to a background thread#50386

Open
Veykril wants to merge 1 commit intomainfrom
push-vukvunzqztpo
Open

language: Defer dropping the SyntaxSnapshot to a background thread#50386
Veykril wants to merge 1 commit intomainfrom
push-vukvunzqztpo

Conversation

@Veykril
Copy link
Member

@Veykril Veykril commented Feb 28, 2026

Dropping deep tree-sitter Trees can be quite slow due to deallocating lots of memory (in the 10s of milliseconds for big diffs). To avoid blocking the main thread, we offload the drop operation to a background thread.

Instead of a static thread we could also integrate this with the gpui app or use the executors, but both of that would require threading that through as a field which I don't think is too great either

Release Notes:

  • N/A or Added/Fixed/Improved ...

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 28, 2026
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Feb 28, 2026
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