# worktree: Yield during large file decoding \(\#62831\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/cef06d351bec10d0fb6176018ce8624e97baeb40)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: cef06d351bec10d0fb6176018ce8624e97baeb40

Requested commit: cef06d351bec10d0fb6176018ce8624e97baeb40

Commit: cef06d351bec10d0fb6176018ce8624e97baeb40

Tree: 488cd2bcd795b9bf4cb5bc72eb7b639cf847ff12

Author: Ali

Committer: GitHub

## Message

```
worktree: Yield during large file decoding (#62831)

# Objective
Closing a project while a large local text file is loading can be
delayed
because file-reading and UTF-8 streaming loops have no await points.

Partially addresses #27283.
## Solution

Yield between 1 MiB blocks while:
- streaming UTF-8 files into a Rope
- reading files handled by the fallback decoder, including BOM, UTF-16,
  and other non-UTF-8 encodings

Release Notes:

- Improved responsiveness when closing projects that are loading large
text files.
```

## Parents

- [a58fff1334b2ea44aaa579b15a5ddd21ccf20bd2](https://git.cafe/gitcafe/zed/commit/a58fff1334b2ea44aaa579b15a5ddd21ccf20bd2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/cef06d351bec10d0fb6176018ce8624e97baeb40?format=markdown)
