# fs: Replace a bunch of uses of smol::fs with manual impls \(again\) \(\#40433\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e85c0606255825eb5bba1bd36231500e740fc28f

Requested commit: e85c0606255825eb5bba1bd36231500e740fc28f

Commit: e85c0606255825eb5bba1bd36231500e740fc28f

Tree: 287a92db399eb9e035317adaa888b9205c5f0891

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
fs: Replace a bunch of uses of smol::fs with manual impls (again) (#40433)

Follow-up after #40417, which should've fixed hangs.

smol::fs uses a separate threadpool, which is a bit yuck.

This PR also added a benchmark you can use to run a full worktree scan
(initial one, that is) for arbitrary worktree.. and refactored worktree
scanner to use async locks, as otherwise tests were deadlocking. :)
I've benchmarked it against Zed, Linux and Chromium and saw a ~60% drop
in initial worktree scan times across the board.

Release Notes:

- Significantly (3.3x speedup over the old implementation) improved
speed of Zed's worktree scanner, that's responsible for synchronizing
the state of your project with the state of files on hard drive.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
```

## Parents

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

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