mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-28 06:22:33 +00:00
* perf: renaming a folder or deleting all chats takes seconds when many users are online Renaming, sharing, moving or deleting a folder, and deleting all chats, each made the server recheck access for every chat that any online user had open in a browser tab, one database lookup at a time, before the request finished, and every one of those open chats reloaded its contents afterwards. Any user can do these, so with a few thousand people online every such click took several seconds and reloaded everyone's open chat. Owners keep access to their own chats (a role change or account deletion already disconnects them), so the recheck now skips owners entirely, with no lookup and no reload, and only checks people viewing someone else's chat and chats that no longer exist. Anyone who lost access is still removed from the chat as before. Postgres 16, one open chat per online user, 2% of them viewing someone else's chat, time for a folder rename (the other actions above run the same recheck): | Online users | No Redis, before | No Redis, after | Redis, before | Redis, after | | --- | --- | --- | --- | --- | | 1,000 | 2.2 s | 0.12 s | 2.5 s | 0.23 s | | 3,000 | 6.9 s | 0.60 s | 7.7 s | 0.78 s | * refac: collect the open chats with a plain loop Same behaviour, the owner lookup now reads more plainly. * refac: shorten the owner comment in the chat access sweep |
||
|---|---|---|
| .. | ||
| access_grants.py | ||
| apps.py | ||
| auths.py | ||
| automations.py | ||
| calendar.py | ||
| channels.py | ||
| chat_messages.py | ||
| chats.py | ||
| config.py | ||
| feedbacks.py | ||
| files.py | ||
| folders.py | ||
| function_history.py | ||
| functions.py | ||
| groups.py | ||
| knowledge.py | ||
| memories.py | ||
| messages.py | ||
| model_history.py | ||
| models.py | ||
| notes.py | ||
| oauth_sessions.py | ||
| prompt_history.py | ||
| prompts.py | ||
| shared_chats.py | ||
| skill_history.py | ||
| skills.py | ||
| tags.py | ||
| tool_history.py | ||
| tools.py | ||
| users.py | ||