Files
open-webui/backend/open_webui/utils
Classic298 3a7291ba7e perf: large chats open faster when context compaction is off (#34671)
Opening a chat loaded the whole conversation a second time to work out how full the model's context is, even with Context Compaction off, which is the default. The server only sends that figure while compaction is on, so with it off every open of a large chat read the conversation twice for nothing. Chats now skip the second read while Context Compaction is off, and nothing changes with it on.

Server time to open a chat with Context Compaction off, fastest of repeated opens:

| Chat size | Postgres before | Postgres after | SQLite before | SQLite after |
|---|---|---|---|---|
| 1 MB | 25 ms | 17 ms | 21 ms | 9 ms |
| 10 MB | 66 ms | 44 ms | 39 ms | 20 ms |
| 50 MB | 337 ms | 184 ms | 119 ms | 71 ms |
| 130 MB | 653 ms | 464 ms | 264 ms | 143 ms |

Fixes #34670
2026-11-18 23:38:50 +04:00
..
2026-11-10 21:18:18 +09:00
2026-11-17 19:31:57 +09:00
2026-11-17 19:31:57 +09:00
2026-11-17 19:57:45 +09:00
2026-11-13 17:36:00 +09:00
2026-11-16 21:10:30 +09:00
2026-11-02 00:31:46 +09:00
2026-11-09 08:05:51 +09:00
2026-11-05 11:41:25 +09:00
2026-11-17 19:31:57 +09:00
2026-11-16 21:10:30 +09:00
2026-10-12 17:29:04 +04:00
2026-07-23 02:54:56 -04:00
2026-11-02 09:52:30 +09:00
2026-11-13 17:36:00 +09:00
2026-07-31 17:41:14 -04:00
2026-11-13 17:36:00 +09:00
2026-11-02 08:48:51 +09:00
2026-10-25 08:24:14 +09:00
2026-11-17 22:30:21 +09:00
2026-11-18 18:55:30 +04:00
2026-11-17 22:30:21 +09:00
2026-07-26 23:09:22 -04:00
2026-11-05 16:54:50 +09:00
2026-11-17 22:01:25 +09:00
2026-11-02 08:48:51 +09:00
2026-11-02 08:48:51 +09:00
2026-03-17 17:58:01 -05:00
2026-08-24 18:29:36 -04:00
2026-11-02 12:45:15 +09:00
2026-10-16 14:31:39 +04:00
2026-11-17 00:14:38 +09:00
2026-11-06 13:40:53 +09:00
2026-11-16 13:15:49 +09:00
2026-11-13 17:36:00 +09:00
2026-11-16 21:10:30 +09:00
2026-11-11 15:34:33 +09:00
2026-11-18 01:13:09 +09:00
2026-11-02 08:48:51 +09:00
2026-10-11 15:55:57 +04:00
2026-11-02 08:48:51 +09:00