Perf: loading knowledge files in pages
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
- [x] Target branch: Verify that the pull request targets the
devbranch. Not targeting thedevbranch may lead to immediate closure of the PR. - [x] Description: Provide a concise description of the changes made in this pull request.
- [x] Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
- [x] Documentation: If necessary, update relevant documentation Open WebUI Docs like environment variables, the tutorials, or other documentation sources.
- [x] Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] Testing: Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description.
- [x] Agentic AI Code:: Confirm this Pull Request is not written by any AI Agent or has at least gone through additional human review and manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
- [x] Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] Title Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
- BREAKING CHANGE: Significant changes that may affect compatibility
- build: Changes that affect the build system or external dependencies
- ci: Changes to our continuous integration processes or workflows
- chore: Refactor, cleanup, or other non-functional code changes
- docs: Documentation update or addition
- feat: Introduces a new feature or enhancement to the codebase
- fix: Bug fix or error correction
- i18n: Internationalization or localization changes
- perf: Performance improvement
- refactor: Code restructuring for better maintainability, readability, or scalability
- style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
- test: Adding missing tests or correcting existing tests
- WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
Implemented a paging mechanism for displaying the files in the knowledge UI page. It dynamically loads batches of 100 files into the page per user request (scrolling to the end of the files list, similarly to the chat scroll mechanism). This should drastically improve loading the overview of a large knowledge
Added
Paging for file list component on knowledge overview page.
Additional Information
Partially resolves #17998.
Video of the change:
https://github.com/user-attachments/assets/c6bf8331-c4b9-4e74-887d-936665cc1950
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
Good Morning @expruc, thx for this pull request, if you want me to test that, I would be happy to apply that to my Test-Env. Could you please share a docker slim image? Thx, best regards, Robert
Sure @deliciousbob https://github.com/expruc/open-webui/pkgs/container/open-webui/549638502?tag=perf-knowledge_files_loading-slim
Hi @expruc, I've just tested it, and it works perfectly fine, lazy loading is causing the files in the collections to load much faster! Thx for the change, looking forward to the merge to production! :)
#19278