[PATCH 1/2] Use 250ms interval for installation progress updating
Vratislav Podzimek
vpodzime at redhat.com
Mon Sep 10 12:21:58 UTC 2012
Using GLib.idle_add for action that repeats means 100% CPU usage. So
let's use GLib.timeout_add with 250ms interval instead.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/ui/gui/hubs/progress.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py
index 13d1811..a9272dc 100644
--- a/pyanaconda/ui/gui/hubs/progress.py
+++ b/pyanaconda/ui/gui/hubs/progress.py
@@ -146,7 +146,7 @@ class ProgressHub(Hub):
# seconds, so we need to do the first call manually.
self._cycle_rnotes()
- self._progress_id = GLib.idle_add(self._update_progress)
+ self._progress_id = GLib.timeout_add(250, self._update_progress)
self._rnotes_id = GLib.timeout_add_seconds(60, self._cycle_rnotes)
threadMgr.add(AnacondaThread(name="AnaInstallThread", target=doInstall,
args=(self.storage, self.payload, self.data, self.instclass)))
--
1.7.11.4
More information about the anaconda-patches
mailing list