open-webui/backend
Classic298 d93cb3658d
perf(models): batch-fetch function valves to eliminate N+1 queries (#22301)
* 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
2026-03-06 15:56:01 -06:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
open_webui perf(models): batch-fetch function valves to eliminate N+1 queries (#22301) 2026-03-06 15:56:01 -06:00
.dockerignore fix: litellm config issue 2024-02-24 22:35:11 -08:00
.gitignore refac 2024-09-06 04:59:20 +02:00
dev.sh feat: add Feishu OAuth integration 2025-09-12 14:09:32 +08:00
requirements-min.txt Merge pull request #22231 from ShirasawaSama/patch-10 2026-03-04 13:53:50 -06:00
requirements.txt feat: add otel system metrics instrumentation (#22265) 2026-03-06 14:24:24 -06:00
start.sh 0.6.33 (#18118) 2025-10-07 16:20:27 -05:00
start_windows.bat fix: windows start script 2025-06-27 15:46:38 +04:00