Optimize Web UI blocking tasks and fix hardware detection regression#204
Optimize Web UI blocking tasks and fix hardware detection regression#204
Conversation
- Optimize `dashboard` handler to use `tokio::task::spawn_blocking` for system metric collection. - Optimize `add_user_handler` and `delete_user_handler` to use `tokio::task::spawn_blocking` and non-blocking locks. - Fix regression in `HardwareInfo::detect` by restoring `refresh_disks_list()`. - Bump version to 1.0.8. - Update README with version and optimization notes.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR introduces performance optimizations for the Web UI and fixes a regression in hardware detection.
Changes:
dashboardhandler now offloads heavy system metric collection (which involves locking and I/O) to a blocking thread usingtokio::task::spawn_blocking. This prevents blocking the async executor. Similarly, user management handlers (add_user,delete_user) now usespawn_blockingto handle file I/O and password hashing without stalling the reactor.sys.refresh_disks_list()inHardwareInfo::detectto ensure the disk list is populated before querying disk usage. Addedsys.refresh_disks()to ensure accurate usage statistics.README.mdto reflect version 1.0.8 and highlighted the new optimizations.PR created automatically by Jules for task 1754513785323550624 started by @Cylae