Files
open-webui/backend/open_webui/routers
Classic298 991bb4609f fix: exporting chats, the archived chats list and Unarchive All slow down with many chats (#35005)
Since #34689 stored every message on its own, every action that loads many chats with their messages read them one chat at a time, so exporting chats, a folder's export, the admin's All Chats export and the archived chats list got several times slower, growing with the number of chats. The messages of the listed chats now come in one read per 500 chats. Unarchive All only needs to know which chats are archived and no longer loads any messages.

<table>
<tr><th>1000 chats, 10 messages each</th><th>SQLite before #34689</th><th>SQLite now</th><th>SQLite fix</th><th>PostgreSQL before #34689</th><th>PostgreSQL now</th><th>PostgreSQL fix</th></tr>
<tr><td>Export Chats</td><td>0.26 s</td><td>1.00 s</td><td>0.58 s</td><td>0.27 s</td><td>1.82 s</td><td>0.46 s</td></tr>
<tr><td>Folder export</td><td>0.21 s</td><td>1.86 s</td><td>0.51 s</td><td>0.19 s</td><td>1.09 s</td><td>0.42 s</td></tr>
<tr><td>Archived chats list</td><td>0.25 s</td><td>1.08 s</td><td>0.57 s</td><td>0.21 s</td><td>1.11 s</td><td>0.40 s</td></tr>
<tr><td>Unarchive All</td><td>0.07 s</td><td>1.13 s</td><td>0.02 s</td><td>0.13 s</td><td>0.94 s</td><td>0.05 s</td></tr>
<tr><td>Admin All Chats export</td><td>0.14 s</td><td>1.96 s</td><td>0.79 s</td><td>0.33 s</td><td>1.45 s</td><td>0.59 s</td></tr>
</table>

Fixes #35001
2026-11-25 03:39:28 +04:00
..
2026-11-22 17:13:34 +04:00
2026-11-23 16:10:09 +04:00
2026-11-02 08:48:51 +09:00
2026-11-23 18:23:07 +04:00
2026-11-02 08:48:51 +09:00
2026-11-25 01:46:31 +04:00
2026-11-22 15:54:36 +04:00
2026-11-24 16:39:36 +04:00
2026-11-02 08:48:51 +09:00
2026-11-02 08:48:51 +09:00
2026-11-25 02:15:42 +04:00
2026-11-02 08:48:51 +09:00
2026-11-25 02:15:42 +04:00
2026-11-23 16:21:00 +04:00
2026-10-31 16:50:01 +09:00
2026-11-25 02:15:42 +04:00
2026-11-25 02:15:42 +04:00
2026-11-02 08:48:51 +09:00
2026-11-02 08:48:51 +09:00
2026-11-24 16:39:36 +04:00
2026-11-05 13:57:52 +09:00
2026-11-13 17:36:00 +09:00
2026-11-24 20:24:18 +04:00
2026-11-21 16:20:44 +04:00
2026-11-17 22:24:21 +09:00
2026-09-06 17:27:30 -04:00
2026-11-25 02:15:42 +04:00