mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
For long threads we will spend more and more time cloning the messages just to save them to the database, as we need a copy of everything to do so asynchronously. Messages are really expensive to clone though and we accumulate a lot of them really fast, so even for smaller threads we start seeing pauses in the millisecond range. The fix to this is fairly simple though, we never mutate the messages once pushed to the vec, so just Arc them. This PR also slightly changes `UserMessage` to be a bit faster to clone as well. Release Notes: - Fixed a cause of stutters when interacting with the agent |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||