language: Fix reparse timeout not actually working#45347
Merged
Conversation
e5f264e to
5b8e8ad
Compare
5b8e8ad to
0210609
Compare
We use `block_with_timeout` to give the reparse task a millisecond to complete, and if it takes longer we put the work off to the background. The reason for this is that we want tree-sitter based features to feel snappy. The reparse task is non-cooperative though, it has no yield points, giving us no place to actually check for our timeout, meaning we will always drive it to completion and block for the entire duration. This kicks out the `block_with_timeout` in favor of using the treesitter progress callback to handle timeouts instead.
0210609 to
b9e7d1b
Compare
28fa070 to
c3e8f0c
Compare
Contributor
|
im having trouble parsing those release notes, "very language language files" 😄? very large? |
Member
Author
|
oops, one of those was meant to be large |
rtfeldman
pushed a commit
that referenced
this pull request
Jan 5, 2026
We use `block_with_timeout` to give the reparse task a millisecond to complete, and if it takes longer we put the work off to the background. The reason for this is that we want tree-sitter based features to feel snappy. The reparse task is non-cooperative though, it has no yield points, giving us no place to actually check for our timeout, meaning we will always drive it to completion and block for the entire duration. This kicks out the `block_with_timeout` in favor of using the treesitter progress callback to handle timeouts instead. Release Notes: - Improved responsiveness with very language language files on edits
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
) We use `block_with_timeout` to give the reparse task a millisecond to complete, and if it takes longer we put the work off to the background. The reason for this is that we want tree-sitter based features to feel snappy. The reparse task is non-cooperative though, it has no yield points, giving us no place to actually check for our timeout, meaning we will always drive it to completion and block for the entire duration. This kicks out the `block_with_timeout` in favor of using the treesitter progress callback to handle timeouts instead. Release Notes: - Improved responsiveness with very language language files on edits
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Jan 20, 2026
) We use `block_with_timeout` to give the reparse task a millisecond to complete, and if it takes longer we put the work off to the background. The reason for this is that we want tree-sitter based features to feel snappy. The reparse task is non-cooperative though, it has no yield points, giving us no place to actually check for our timeout, meaning we will always drive it to completion and block for the entire duration. This kicks out the `block_with_timeout` in favor of using the treesitter progress callback to handle timeouts instead. Release Notes: - Improved responsiveness with very language language files on edits
LivioGama
pushed a commit
to LivioGama/zed
that referenced
this pull request
Feb 15, 2026
) We use `block_with_timeout` to give the reparse task a millisecond to complete, and if it takes longer we put the work off to the background. The reason for this is that we want tree-sitter based features to feel snappy. The reparse task is non-cooperative though, it has no yield points, giving us no place to actually check for our timeout, meaning we will always drive it to completion and block for the entire duration. This kicks out the `block_with_timeout` in favor of using the treesitter progress callback to handle timeouts instead. Release Notes: - Improved responsiveness with very language language files on edits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We use
block_with_timeoutto give the reparse task a millisecond to complete, and if it takes longer we put the work off to the background.The reason for this is that we want tree-sitter based features to feel snappy.
The reparse task is non-cooperative though, it has no yield points, giving us no place to actually check for our timeout, meaning we will always drive it to completion and block for the entire duration.
This kicks out the
block_with_timeoutin favor of using the treesitter progress callback to handle timeouts instead.Release Notes: