mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-30 17:05:16 -05:00
Every time a chat is opened, the server marks it as read, and to do so it loaded and parsed the full chat, images included, just to save the last-read time. Marking a chat as unread and removing a tag from a chat did the same. These now touch only the few chat fields they change, which makes them 4 to 6 times faster on large chats. Measured on SQLite, best of 7 runs, sizes are the chat as stored in the database: | Chat | Action | Before | After | | --- | --- | --- | --- | | 7 MB, text only | open (mark read) | 19.8 ms | 3.5 ms | | 7 MB, text only | mark as unread | 20.7 ms | 3.5 ms | | 7 MB, text only | remove tag | 21.2 ms | 3.4 ms | | 49 MB, with images | open (mark read) | 122.2 ms | 30.0 ms | | 49 MB, with images | mark as unread | 124.2 ms | 29.1 ms | | 49 MB, with images | remove tag | 120.5 ms | 28.6 ms |