Files
open-webui/backend/open_webui/models
Classic298 a59cab0aa9 perf: knowledge base changes slow down as the knowledge base grows (#33335)
Adding, updating or removing knowledge base files through the API sent back the metadata of every file in the knowledge base, and so did renaming a knowledge base or changing its access. These calls got slower as the knowledge base grew, so bulk ingestion through the API lost speed with every batch. Adding or updating files now returns only those files, while removing a file, renaming or changing access returns an empty files list. API clients that read the files list from these responses now get only the affected files; the full list stays available, paginated, from `GET /api/v1/knowledge/{id}/files`. Timings with a local mock embedding server that answers instantly, median of 5 runs (at 1,000 files the per-file work of a batch still hides the difference):

| Files already in the knowledge base | Call | Before | After | Response size before | Response size after |
|---|---|---|---|---|---|
| 1,000 | batch add of 100 files | 519 ms | 528 ms | 437 KB | 39 KB |
| 10,000 | batch add of 100 files | 679 ms | 476 ms | 4.0 MB | 39 KB |
| 10,000 | single file add | 184 ms | 36 ms | 4.0 MB | 0.6 KB |

Closes #31397
2026-10-29 17:00:29 +09:00
..
2026-10-09 15:07:43 +04:00
2026-10-26 16:09:25 +09:00
2026-10-13 17:22:11 +04:00
2026-10-05 12:17:25 +04:00
2026-10-25 14:20:56 +09:00
2026-10-25 14:20:56 +09:00
2026-10-26 07:24:36 +09:00
2026-10-28 10:25:04 +09:00
2026-10-09 18:37:55 +04:00
2026-10-09 18:37:55 +04:00
2026-07-24 01:54:36 -04:00
2026-10-16 15:20:15 +04:00
2026-10-09 17:05:53 +04:00
2026-10-25 14:20:56 +09:00
2026-10-28 10:02:45 +09:00
2026-07-31 17:41:14 -04:00
2026-10-09 16:17:11 +04:00
2026-10-25 14:20:56 +09:00
2026-10-08 14:30:07 +04:00
2026-10-09 16:31:34 +04:00
2026-10-25 14:20:56 +09:00
2026-10-09 18:37:55 +04:00
2026-10-25 14:20:56 +09:00
2026-10-14 18:49:51 +04:00