Bug 97322 - battstat applet uses too much CPU, checks stats too often
battstat applet uses too much CPU, checks stats too often
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gnome-applets (Show other bugs)
9
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Mark McLoughlin
Mike McLean
: MoveUpstream, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-12 19:31 EDT by John Richardson
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-07-19 05:06:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Richardson 2003-06-12 19:31:26 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030516
Mozilla Firebird/0.6

Description of problem:

The battstat applet is constantly at the top of my top listing (or
system monitor).  I didn't profile to check what it is doing, but
I did notice in the code that it checks the battery stats
every 1 second.  That's a bit too frequent, considering how often
it changes.  I've changed it to 10 seconds and it seems to work
well.

[root@bird BUILD]# diff -u gnome-applets-2.2.0/battstat/battstat_applet.c.orig
gnome-applets-2.2.0/battstat/battstat_applet.c
--- gnome-applets-2.2.0/battstat/battstat_applet.c.orig 2003-06-12
17:46:54.000000000 -0400
+++ gnome-applets-2.2.0/battstat/battstat_applet.c      2003-06-12
17:42:27.000000000 -0400
@@ -1501,7 +1501,7 @@
   pixmap_timeout(battstat);
   change_orient (applet, battstat->orienttype, battstat );
  
-  battstat->pixtimer = gtk_timeout_add (1000, pixmap_timeout, battstat);
+  battstat->pixtimer = gtk_timeout_add (10000, pixmap_timeout, battstat);
  
   gtk_container_add (GTK_CONTAINER (battstat->applet), battstat->hbox1);
  


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. install battstat applet on panel
2. check cpu load
3.
    

Actual Results:  cpu load at 1 to 2 % for battstat applet

Additional info:
Comment 1 David Moore 2003-10-11 21:05:37 EDT
Does your machine use ACPI for power management?  If so, you probably want to
look at bug 104292.
Comment 2 Mark McLoughlin 2004-07-19 05:06:26 EDT
This sounds like its pretty much fixed up in Fedora Core 2.

Note You need to log in before you can comment on or make changes to this bug.