# linux/x11: send XCB requests asynchronously \(\#8045\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d51a0b60be59d67b84c019116923126e90420fc3

Requested commit: d51a0b60be59d67b84c019116923126e90420fc3

Commit: d51a0b60be59d67b84c019116923126e90420fc3

Tree: 7817c277a5422748937ce06efd22c4eece8f80fd

Author: Dzmitry Malyshau

Committer: GitHub

## Message

```
linux/x11: send XCB requests asynchronously (#8045)

With `send_and_check_request` we'd be blocking both the main loop and
the caller. `send_request` is only going to be blocking on the main loop
when processing the request.

Release Notes:
- N/A

Based on a flamegraph from `perf`/`hotspot`, we are spending 40% of time
redrawing, another 40% of time downloading stuff (i.e. rust toolchain),
and the rest on text rendering, layout and such. This is with Vulkan
Validation (see https://github.com/zed-industries/zed/pull/8044).

I'm also wondering if it would be better with #7758, but regardless we
should have no problem rendering at 60-120 fps and processing user
input. More follow-ups are expected here.
```

## Parents

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

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