zed/crates/acp_thread
Lukas Wirth 63ff99795c
agent: Make messages vec cheap to clone (#57712)
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
2026-05-26 10:00:34 +00:00
..
src agent: Make messages vec cheap to clone (#57712) 2026-05-26 10:00:34 +00:00
Cargo.toml agent: Do not decode images during render (#56866) 2026-05-19 09:51:42 +00:00
LICENSE-GPL Claude experiment (#34577) 2025-07-17 14:25:55 +00:00