Files
open-webui/backend/open_webui/models
Classic298 414340682e perf: long chats no longer rewrite the whole conversation on every message (#34689)
Every sent message, finished reply, regenerate, edit and saved follow-up rewrote the whole stored conversation, so long chats got slower with each turn, most of all on PostgreSQL. Messages now live only in the message table the app already keeps, and a change writes only the messages it touches. Chats open, share, export and import as before. API responses no longer carry the flat message list older clients saved next to the conversation, and the answers to pinning, archiving, sharing or moving a chat no longer repeat its messages. Existing chats are converted once during the upgrade, in batches that continue where they stopped if the upgrade is interrupted.

| 130 MB chat, instant test model | SQLite before | SQLite after | PostgreSQL before | PostgreSQL after |
| --- | --- | --- | --- | --- |
| Message accepted | 2.4 s | 0.20 s | 10.9 s | 0.32 s |
| Reply done | 4.9 s | 0.9 s | 22.5 s | 1.4 s |
| Regenerate done | 4.6 s | 0.9 s | 19.6 s | 1.4 s |
| Saving an edit | 3.7 s | 1.8 s | 5.8 s | 1.7 s |
| Opening the chat | 2.3 s | 0.9 s | 1.6 s | 1.2 s |
| Written to the database per message | 533 MB | 2 KB | 533 MB | 2 KB |

Fixes #34688
2026-11-25 02:34:37 +04:00
..
2026-11-17 17:02:34 +09:00
2026-11-02 08:48:51 +09:00
2026-11-05 12:01:25 +09:00
2026-11-02 08:48:51 +09:00
2026-11-22 17:13:34 +04:00
2026-11-02 08:48:51 +09:00
2026-11-05 22:38:02 +09:00
2026-11-24 22:11:32 +04:00
2026-11-21 22:27:07 +04:00
2026-11-22 15:54:36 +04:00
2026-11-24 22:26:11 +04:00
2026-11-22 17:13:34 +04:00
2026-11-02 08:48:51 +09:00
2026-11-17 22:03:13 +09:00
2026-11-17 17:02:34 +09:00
2026-07-24 01:54:36 -04:00
2026-11-08 11:52:13 +09:00
2026-10-09 17:05:53 +04:00
2026-11-25 02:15:42 +04:00
2026-11-23 16:21:00 +04:00
2026-11-11 13:49:51 +09:00
2026-11-02 08:48:51 +09:00
2026-11-02 08:48:51 +09:00
2026-10-09 16:31:34 +04:00
2026-11-02 08:48:51 +09:00
2026-11-23 16:10:09 +04:00
2026-11-02 08:48:51 +09:00