Skip to content

language: Fix reparse timeout not actually working#45347

Merged
Veykril merged 2 commits intomainfrom
push-xxmmspnlsvnn
Jan 5, 2026
Merged

language: Fix reparse timeout not actually working#45347
Veykril merged 2 commits intomainfrom
push-xxmmspnlsvnn

Conversation

@Veykril
Copy link
Member

@Veykril Veykril commented Dec 19, 2025

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 large language files on edits

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 19, 2025
@Veykril Veykril self-assigned this Jan 5, 2026
@Veykril Veykril force-pushed the push-xxmmspnlsvnn branch from e5f264e to 5b8e8ad Compare January 5, 2026 12:32
@Veykril Veykril marked this pull request as ready for review January 5, 2026 12:32
@Veykril Veykril force-pushed the push-xxmmspnlsvnn branch from 5b8e8ad to 0210609 Compare January 5, 2026 12:38
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.
@Veykril Veykril force-pushed the push-xxmmspnlsvnn branch from 0210609 to b9e7d1b Compare January 5, 2026 13:13
@Veykril Veykril force-pushed the push-xxmmspnlsvnn branch from 28fa070 to c3e8f0c Compare January 5, 2026 14:08
@Veykril Veykril enabled auto-merge (squash) January 5, 2026 14:16
@Veykril Veykril merged commit ccce05d into main Jan 5, 2026
23 checks passed
@Veykril Veykril deleted the push-xxmmspnlsvnn branch January 5, 2026 14:18
@xdBronch
Copy link
Contributor

xdBronch commented Jan 5, 2026

im having trouble parsing those release notes, "very language language files" 😄? very large?

@Veykril
Copy link
Member Author

Veykril commented Jan 5, 2026

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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants