[Xfce4-commits] <thunar:shared-progress-dialog> Use 0.01 instead of 0.05 percent for smoother progress bars.
Jannis Pohlmann
jannis at xfce.org
Sat Sep 12 18:30:02 CEST 2009
Updating branch refs/heads/shared-progress-dialog
to 55e0cb2a359871b71d51c389e9ab3108f3dcd753 (commit)
from 7d8ee42813b2b215b84ff40236c66697257332d2 (commit)
commit 55e0cb2a359871b71d51c389e9ab3108f3dcd753
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Sat Sep 12 18:26:31 2009 +0200
Use 0.01 instead of 0.05 percent for smoother progress bars.
It still seems to reduce the CPU usage by about the same amount than
0.05 percent did (5-9% instead of 50%).
thunar/thunar-transfer-job.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/thunar/thunar-transfer-job.c b/thunar/thunar-transfer-job.c
index 78751b2..83e4566 100644
--- a/thunar/thunar-transfer-job.c
+++ b/thunar/thunar-transfer-job.c
@@ -145,8 +145,8 @@ thunar_transfer_job_progress (goffset current_num_bytes,
new_percentage = (job->total_progress * 100.0) / job->total_size;
/* notify callers about the progress only if we have advanced by
- * at least 0.05 percent since the last signal emission */
- if (new_percentage > (job->previous_percentage + 0.05))
+ * at least 0.01 percent since the last signal emission */
+ if (new_percentage >= (job->previous_percentage + 0.01))
{
/* emit the percent signal */
exo_job_percent (EXO_JOB (job), new_percentage);
More information about the Xfce4-commits
mailing list