# agent_ui: Cache cross-channel thread import check off the render loop \(\#58402\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8ed0f5f05aec6d868205df2326b29f5459e3a400

Requested commit: 8ed0f5f05aec6d868205df2326b29f5459e3a400

Commit: 8ed0f5f05aec6d868205df2326b29f5459e3a400

Tree: 9d4e5f6e919c92b5a5e26098935bacb717e140a9

Author: Lukas Wirth

Committer: GitHub

## Message

```
agent_ui: Cache cross-channel thread import check off the render loop (#58402)

channels_with_threads opened a fresh SQLite connection per
release-channel database on every call, and the sidebar called it twice
per frame from its render path, blocking the render loop on disk I/O.

Run the per-channel checks on a background thread and cache the
resulting channel names once at sidebar construction, since the
per-channel databases cannot change while this process runs.

Release Notes:

- Fixed a cause of stutters in the agent panel sidebar rendering
```

## Parents

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

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