mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-25 23:00:53 -05:00
perf: stop reloading the model list on every settings save (#34847)
Every toggle in personal Settings and the Save button in General reloaded the full model list after storing the setting, which calls every connected provider live. The "Settings saved" message waited for that, so a slow connection made each click lag. None of these settings change the model list any more since personal connections were removed from user settings, so a save now just stores the setting and applies it. <table> <tr><td>Mock provider, 500 ms model list, 15 saves</td><td>Before</td><td>After</td></tr> <tr><td>Interface toggle, click to save done</td><td>~580 ms</td><td>~45 ms</td></tr> <tr><td>General Save, click to "Settings saved"</td><td>~585 ms</td><td>~70 ms</td></tr> <tr><td>Provider model list calls per save</td><td>1</td><td>0</td></tr> </table> Fixes #34846
This commit is contained in:
1 parent
4abf416f96
commit
74f2c2192e
1 file changed
+1
-2
@@ -9,7 +9,7 @@
|
||||
import { getContext, tick } from 'svelte';
|
||||
import type { Writable } from 'svelte/store';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { config, mobile, models, settings, user, visibleControls } from '$lib/stores';
|
||||
import { config, mobile, settings, user, visibleControls } from '$lib/stores';
|
||||
import type { SettingsModalRequest } from '$lib/stores';
|
||||
import { getUserSettings, updateUserSettings } from '$lib/apis/users';
|
||||
import { getBackendConfig, getModels as _getModels } from '$lib/apis';
|
||||
@@ -447,7 +447,6 @@
|
||||
await settings.set(
|
||||
mergeUiSettings($config?.ui?.default_interface_settings ?? {}, personalUiSettings)
|
||||
);
|
||||
await models.set(await getModels());
|
||||
};
|
||||
|
||||
const getModels = async () => {
|
||||
|
||||
Reference in new issue
Block a user