mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-14 23:22:44 +00:00
* perf(models): batch-fetch function valves to eliminate N+1 queries get_action_priority() called Functions.get_function_valves_by_id() individually for every action on every model — an N+1 query pattern that issued one DB round-trip per (action x model) pair. Add Functions.get_function_valves_by_ids() that fetches all valves in a single WHERE IN query, then look up each action's valves from the pre-fetched dict inside get_action_priority(). No functional change — same priority resolution, same sort order. * Update models.py * Update models.py |
||
|---|---|---|
| .. | ||
| access_grants.py | ||
| auths.py | ||
| channels.py | ||
| chat_messages.py | ||
| chats.py | ||
| feedbacks.py | ||
| files.py | ||
| folders.py | ||
| functions.py | ||
| groups.py | ||
| knowledge.py | ||
| memories.py | ||
| messages.py | ||
| models.py | ||
| notes.py | ||
| oauth_sessions.py | ||
| prompt_history.py | ||
| prompts.py | ||
| skills.py | ||
| tags.py | ||
| tools.py | ||
| users.py | ||