Files
open-webui/backend
Classic298 024181dd2d perf: knowledge base sync with many folders no longer times out (#35630)
Before syncing, the sync client asks the server which files and folders changed. To answer, the server worked out each folder's full path by searching the whole folder list again for every parent folder, so the time grew with the square of the folder count. With tens of thousands of folders that took many minutes, blocked the server meanwhile and made the sync time out. The server now looks up each parent directly, so the folder step takes a fraction of a second.

<table>
<tr><th>Folders in the knowledge base (about 5 levels deep)</th><th>Before</th><th>After</th></tr>
<tr><td>5,000</td><td>3.1 s</td><td>5 ms</td></tr>
<tr><td>10,000</td><td>19.8 s</td><td>10 ms</td></tr>
<tr><td>20,000</td><td>219 s</td><td>43 ms</td></tr>
<tr><td>64,000</td><td>stopped after 25 min</td><td>151 ms</td></tr>
</table>
2026-12-05 08:04:01 +04:00
..
2024-02-24 22:35:11 -08:00
2024-09-06 04:59:20 +02:00
2026-12-04 05:48:10 +04:00
2026-12-04 05:48:10 +04:00
2026-12-04 05:48:10 +04:00
2026-12-04 05:48:10 +04:00
2026-11-02 08:48:51 +09:00
2026-12-04 05:48:10 +04:00