$ the-wire · showcase
Fix large SQLite chat queries and dead DuckDuckGo rate limit
By RepoJournal · Filed · About Open WebUI
Open WebUI patched five hot query paths that make large chat databases unusable, plus a hidden dead code path in DuckDuckGo search.
In the largest change [1], five chat-table queries scaled with total chat history rather than the work returned. Because the narrow filter columns sit after the large chat payload, SQLite walked full overflow pages for every row. On an idle instance with a 1.2 GB database, the timer scheduler alone consumed about a quarter of a CPU core per second. Indexing these queries should bring large SQLite instances back to usable response times.
A related cleanup [2] removed the rate limit handler for DuckDuckGo web search. The `RatelimitException` it caught is defined by the `ddgs` library but never raised in any checked version (9.14.4 and 9.11.3). The fallbacks for `None` or empty results were equally unreachable, as `ddgs.text()` either returns a non-empty list or raises. Removing the dead handler simplifies the path without changing behavior.
Two smaller fixes round out the day: note task lists serialized to markdown as `- [ ] [ ]` with broken formatting, now corrected [3], and two redundant `.keys()` calls in dict membership tests were dropped with no behavior change [4]. Translation coverage for French also advanced .
Action items
- → Schedule a deploy of the latest open-webui build to pick up the SQLite query index fixes open-webui/open-webui [immediate]
References
- [1] fix: index the chat queries that make large SQLite instances unusable ↗ open-webui/open-webui
- [2] refac: remove unreachable rate limit handler from DuckDuckGo web search (#28943) ↗ open-webui/open-webui
- [3] fix: duplicate checkbox markers when serializing note task lists (#27671) ↗ open-webui/open-webui
- [4] refac: drop the redundant .keys() from two dict membership tests (#28859) ↗ open-webui/open-webui