Files
open-webui/backend/open_webui
Classic298 f30667a06f perf: sending a message in an existing chat loads the chat once instead of twice (#33669)
When a message is sent in an existing chat, the server loaded the full chat, then loaded it again right after to check that the user has write access. The check now reuses the chat it already loaded. Who can write to a chat does not change. The saving grows with chat size and is small for ordinary chats.

Time saved per message, measured on SQLite, best of 3 runs, sizes are the chat as stored in the database, images embedded:

| Chat | Time saved |
| --- | --- |
| 7 MB, text only | 34 ms |
| 49 MB, with images | 204 ms |
2026-11-04 05:38:14 +09:00
..
2026-11-02 08:48:51 +09:00
2026-11-02 08:48:51 +09:00
2026-11-03 20:55:06 +09:00
2026-11-02 09:59:00 +09:00
2026-10-05 12:03:19 +04:00
2026-11-02 11:37:00 +09:00
2026-11-03 16:31:24 +09:00
2026-11-02 08:48:51 +09:00
2026-11-03 17:36:03 +09:00
2026-11-03 16:25:23 +09:00
2026-11-02 08:48:51 +09:00