open-webui/backend/open_webui/models
Classic298 113a64ad1a
perf: speed up one-word chat search (#32268)
Chat search checks the whole query and each word in it separately. With a single word those are the same check, so every chat got searched twice. It is now searched once, with the same results. On PostgreSQL with 2164 chats (533 MB of chat data) a one-word search is about 40% faster:

| search | before | after |
|---|---|---|
| proxy | 6.0 s | 3.6 s |
| opnsense | 6.1 s | 3.8 s |
| no match | 5.4 s | 3.0 s |

Refs #32266
2026-10-12 23:32:52 +04:00
..
access_grants.py refac 2026-10-09 15:07:43 +04:00
apps.py refac 2026-10-12 22:14:04 +04:00
auths.py refac 2026-10-05 12:17:25 +04:00
automations.py fix: automation still shows "Last run Never" after "Run now" (#31583) 2026-09-30 19:01:42 +04:00
calendar.py refac 2026-10-05 14:01:02 +04:00
channels.py refac 2026-10-12 17:29:04 +04:00
chat_messages.py refac 2026-10-08 14:30:07 +04:00
chats.py perf: speed up one-word chat search (#32268) 2026-10-12 23:32:52 +04:00
config.py refac 2026-10-05 12:17:25 +04:00
feedbacks.py perf: drop redundant session.refresh calls after commit across the model layer (#27381) 2026-07-23 18:08:00 -05:00
files.py perf: drop redundant session.refresh calls after commit across the model layer (#27381) 2026-07-23 18:08:00 -05:00
folders.py refac 2026-10-08 19:36:27 +04:00
function_history.py refac 2026-10-09 18:37:55 +04:00
functions.py refac 2026-10-09 18:37:55 +04:00
groups.py refac 2026-10-05 14:35:15 +04:00
knowledge.py chore: format 2026-10-10 23:18:09 +04:00
memories.py refac 2026-07-24 01:54:36 -04:00
messages.py refac 2026-10-12 17:57:02 +04:00
model_history.py refac 2026-10-09 17:05:53 +04:00
models.py refac 2026-10-09 17:05:53 +04:00
notes.py refac 2026-10-08 01:09:29 +04:00
oauth_sessions.py refac 2026-07-31 17:41:14 -04:00
prompt_history.py refac 2026-10-09 16:17:11 +04:00
prompts.py refac 2026-10-05 14:01:02 +04:00
shared_chats.py refac 2026-10-08 14:30:07 +04:00
skill_history.py refac 2026-10-09 16:31:34 +04:00
skills.py fix: skill versions saved within the same second are listed in random order (#32167) 2026-10-10 19:49:21 +04:00
tags.py perf: build debug log messages lazily so disabled debug logs cost nothing (#27834) 2026-07-31 19:09:01 -05:00
tool_history.py refac 2026-10-09 18:37:55 +04:00
tools.py refac 2026-10-09 18:37:55 +04:00
users.py fix: user created in the same second as the first admin takes over its protection (#32157) 2026-10-10 20:01:41 +04:00