# search: Add heuristic for discarding matching of binary files \(\#23581\) · gitcafe/zed

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

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

Visibility: public

Requested revision: fb63f617553148e115b5f75ce216ef0df0543c0b

Requested commit: fb63f617553148e115b5f75ce216ef0df0543c0b

Commit: fb63f617553148e115b5f75ce216ef0df0543c0b

Tree: 9a46827dae93858c50b6eda1fd7a475b0545305e

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
search: Add heuristic for discarding matching of binary files (#23581)

Fixes #23398 
Closes #23398

We'll bail on searches of files that we know are binary (thus even if we
were to find a match in them, they'd be thrown away by buffer loader).

Release Notes:

- Improved project search performance in worktrees with binary files
```

## Parents

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

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