perf(progress): report real progress instead of a bouncing bar
pacman restarts its "(1/24)" counter at every phase of a transaction, so the bar was fed 0 percent, 100 percent, 0 percent again a few times per update — and Flatpak/AUR buffered their whole output, which left it indeterminate for the entire run. A shared ProgressTracker now folds every counter, file percentage and package step into one value that only moves forward, the providers stream their output as it is produced, and each provider owns a slice of the bar so a multi-provider update keeps advancing. pacman -Qu is cached like the other read queries, so the sidebar badge, the updates screen and the update button share a single process. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
1 parent
ed58e87520
commit
b26e907221
12 files changed
+590
-138
No files matched your search
@@ -145,9 +145,15 @@ private:
|
||||
LogsPage* m_logs = nullptr;
|
||||
PluginsPage* m_plugins = nullptr;
|
||||
|
||||
// Small indeterminate bar anchored in the status bar, shown at the bottom
|
||||
// of the window while any install/search runs.
|
||||
// Progress of the running operation, anchored in the status bar: the bar
|
||||
// itself (indeterminate until a provider reports a real percentage) and the
|
||||
// value next to it.
|
||||
QProgressBar* m_installProgressBar = nullptr;
|
||||
QLabel* m_progressLabel = nullptr;
|
||||
// Highest percentage reported by the current operation, and a counter that
|
||||
// invalidates the "hide the completed bar" timer when a new one starts.
|
||||
int m_progressValue = 0;
|
||||
int m_progressGeneration = 0;
|
||||
|
||||
// Tray (optional: hidden when the desktop has no system tray)
|
||||
QSystemTrayIcon* m_tray = nullptr;
|
||||
|
||||
Reference in new issue
Block a user