open-webui/backend/open_webui
Classic298 2dca850cee
perf: use set for O(1) lookup in insert_chat_files dedupe (#23800)
Convert chat_message_file_ids from list to set so the membership test
in the comprehension is O(1) instead of O(m), turning the dedupe from
O(n*m) into O(n+m). Also replace the redundant set([...]) with a set
comprehension.

https://claude.ai/code/session_01Le3NnqNhcgaJvFrDZGqmwe

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-17 12:28:34 +09:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal refac 2026-04-17 11:27:58 +09:00
migrations refac: shared chat 2026-04-17 10:16:32 +09:00
models perf: use set for O(1) lookup in insert_chat_files dedupe (#23800) 2026-04-17 12:28:34 +09:00
retrieval feat: add RAG_RERANKING_BATCH_SIZE configuration option 2026-04-17 08:35:45 +09:00
routers refac 2026-04-17 11:54:19 +09:00
socket fix: invalidate stale Socket.IO sessions on role change and user deletion (#23642) 2026-04-12 16:19:38 -05:00
static refac 2026-03-23 23:39:52 -05:00
storage refac 2026-04-12 19:08:30 -05:00
test refac 2026-03-17 17:58:01 -05:00
tools fix(retrieval): offload sync VECTOR_DB_CLIENT calls in async paths via AsyncVectorDBClient (#23706) 2026-04-14 10:50:18 -05:00
utils refac 2026-04-17 12:25:43 +09:00
__init__.py refac (#22987) 2026-03-24 15:41:26 -05:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py feat: add RAG_RERANKING_BATCH_SIZE configuration option 2026-04-17 08:35:45 +09:00
constants.py chore: format 2026-04-14 17:27:31 -05:00
env.py refac 2026-04-17 11:27:58 +09:00
functions.py refac: async db 2026-04-12 14:22:11 -05:00
main.py feat: add RAG_RERANKING_BATCH_SIZE configuration option 2026-04-17 08:35:45 +09:00
tasks.py refac 2026-03-17 17:58:01 -05:00