# Refactor TextLayout to use Rc\<RefCell\> instead of Arc\<Mutex\> for improved performance \(\#27177\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 1db621dc50d2ce2e58e2f1a5cb3eccd256b20b73

Requested commit: 1db621dc50d2ce2e58e2f1a5cb3eccd256b20b73

Commit: 1db621dc50d2ce2e58e2f1a5cb3eccd256b20b73

Tree: 69311e9b5cab0806654a9802a9246a05bc1f9e7b

Author: Sunli

Committer: GitHub

## Message

```
Refactor TextLayout to use Rc<RefCell> instead of Arc<Mutex> for improved performance (#27177)

Since `TextLayout` is not shared by multiple threads, changing it to
`Rc<RefCell<T>>` should improve performance.

I also found several codes with the same problem. If you think this
change is beneficial, I will continue to improve it in the subsequent
PR. 🙂

Release Notes:

- N/A
```

## Parents

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

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