LaoMa3953 / ulipad

Automatically exported from code.google.com/p/ulipad
0 stars 0 forks source link

High cpu usage on Linux #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run UliPad.
2. Do nothing.  Observe process CPU usage.
3. Move cursor around on blank screen. Observe process CPU usage.

What is the expected output? What do you see instead?
Low CPU usage when application is not being used.
Instead ~16% usage for this app when it is doing nothing.
When moving cursor around, the usage increases to ~90%.

This behavior seems to have worsened by a factor of 2 between revisions 183
and 184. (Revisions > 100 and <= 183 had ~8% usage at idle.)

What version of the product are you using? On what operating system?
Current SVN (rev.202 and others as mentioned below) running 
on Ubuntu Linux (Gutsy) and
Gentoo Linux (current stable).

wxGTK - v2.8.7.1
wxPython - v2.8.7.1
gtk+ - 2.12.1
python 2.4 & 2.5

The effect is visible on Windows XP but to a lesser degree.

Please provide any additional information below.

This could relate to differences in wxGTK on the two platforms.  Maybe the
change at revision 184 may give a clue as to why this happens.

I realize UliPad is still under development.  By comparison Komodo-Edit <
1% CPU at rest and Editra (also Python/wx) 1.6% at rest on the same computer.

Diff of revision 183 and 184:

Index: ulipad196/mixins/MainFrame.py
===================================================================
--- ulipad196/mixins/MainFrame.py       (revision 183)
+++ ulipad196/mixins/MainFrame.py       (revision 184)
@@ -142,7 +142,7 @@
                         from modules import PCInfo
                         myRam = PCInfo.memInfo()
 #                        ramStr = "<E7><A9><BA><E9><97><B2>: %dM/%dM
<E7><BC><93><E5><AD><98>: %dM" % (myRam['freeRam'], myRam['totalRam'],
myRam['cachedRam'])
-                        ramStr = "%dM" % (myRam['freeRam'],
myRam['totalRam'], myRam['cachedRam'])
+                        ramStr = "%(freeRam)dM" % myRam
                         wx.CallAfter(self.SetStatusText, ramStr, 5)
                     self.callplugin('on_idle', self)
                     time.sleep(0.5)
Index: ulipad196/modules/MyStatusBar.py
===================================================================
--- ulipad196/modules/MyStatusBar.py    (revision 183)
+++ ulipad196/modules/MyStatusBar.py    (revision 184)
@@ -32,7 +32,7 @@
             self.SetStatusWidths([-1, 70, 60, 40, 60, 45])
         elif wx.Platform == '__WXGTK__':
             self.SetFieldsCount(6)
-            self.SetStatusWidths([-1, 70, 60, 40, 60, 220])
+            self.SetStatusWidths([-1, 70, 60, 40, 60, 45])
         else:
             self.SetFieldsCount(5)
             self.SetStatusWidths([-1, 70, 60, 40, 60])

Original issue reported on code.google.com by shma...@gmail.com on 10 Jan 2008 at 5:13

GoogleCodeExporter commented 8 years ago
according to your clue, I add linux memory display, and this feature will read
"/proc/meminfo" file when IDLE, so maybe I need to remove it?

Original comment by limo...@gmail.com on 11 Jan 2008 at 1:02

GoogleCodeExporter commented 8 years ago
already remove it.

Original comment by limo...@gmail.com on 16 Jan 2008 at 2:45