[Feature Request]:Implement Asynchronous Task Queue for Large File Processing to Prevent UI Blocking
Do you need to file a feature request?
- [x] I have searched the existing feature request and this feature request is not already filed.
- [x] I believe this is a legitimate feature request, not just a question or bug.
Feature Request Description
Comment: Describe the Issue I recently tried uploading 4 large textbooks simultaneously to the system. While the backend successfully started processing the files (parsing/embedding), the frontend UI remained unresponsive and did not show the files as "Added" until the entire process was completed.
Observations I monitored my system resources and confirmed that the application was indeed working hard, as the CPU usage hit 100% (see the screenshot below).
The Problem Because the file processing seems to be synchronous (blocking), the user interface provides no feedback during this heavy computation period. For users who are not monitoring their terminal logs or CPU usage (especially non-technical users), it looks like the application has frozen or crashed. This creates a confusing user experience.
Suggested Solution I suggest implementing an asynchronous task queue (e.g., using Celery, Redis, or background tasks) to handle file parsing and embedding.
Backend: Offload the heavy lifting to a background worker so the API can return an immediate "Processing" status to the frontend.
Frontend: Display a progress bar or a "Processing..." spinner state instead of waiting for the final response.
Thanks for the great work on this project!
Related Module
Knowledge Base Management
Use Case
This would significantly improve the UX and reassure users that the system is working correctly.
Additional Context
Note regarding the screenshot: Please notice that the files visible in the library list in the image are from previous uploads. The 4 new textbooks I just submitted have not appeared in the list yet, even though the system is actively working on them.
hi, thanks for your comments! we'll try to add it asap.
hi @Michael20070814, this issue is resolved.