Bug 97322 - battstat applet uses too much CPU, checks stats too often
Summary: battstat applet uses too much CPU, checks stats too often
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gnome-applets   
(Show other bugs)
Version: 9
Hardware: i686 Linux
medium
low
Target Milestone: ---
Assignee: Mark McLoughlin
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords: MoveUpstream, Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-12 23:31 UTC by John Richardson
Modified: 2007-04-18 16:54 UTC (History)
0 users

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


Attachments (Terms of Use)

Description John Richardson 2003-06-12 23:31:26 UTC
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-12 01:05:37 UTC
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 09:06:26 UTC
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.