ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> komodo-beta
komodo-beta
Re: [Komodo-3-beta] Mandrake 10.0 - Komodo Beta version 3.0.0-beta4
by Beer other posts by this author
Jul 2 2004 10:06AM messages near this date
view in the new Beta List Site
Re: [Komodo-3-beta] Mandrake 10.0 - Komodo Beta version 3.0.0-beta4 | Re: [Komodo-3-beta] Mandrake 10.0 - Komodo Beta version 3.0.0-beta4
top - 12:53:47 up  1:06,  2 users,  load average: 0.91, 0.55, 0.23
Tasks:  86 total,   1 running,  85 sleeping,   0 stopped,   0 zombie
Cpu(s): 85.1% us,  3.6% sy,  0.0% ni, 11.3% id,  0.0% wa,  0.0% hi, 
0.0% si
Mem:    255076k total,   250384k used,     4692k free,     1908k buffers
Swap:   511520k total,      320k used,   511200k free,    69244k cached
                                                                                
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
2461 beer      17   0  153m  41m  23m S 71.2 16.6   0:34.65 komodo-bin
2405 beer      15   0 20704  12m  15m S  3.0  5.0   0:03.66
gnome-terminal
2306 beer      15   0 11372 7236 9.8m S  1.3  2.8   0:03.05 metacity

Every time I input text on the keyboard komodo jumps up to 70+% CPU. My
local settings are english.

Now applying the patch.

[beer@localhost beer]$ find -name 'koInitService.py'
./Komodo-3.0/Mozilla/components/koInitService.py
[beer@localhost beer]$ vi Komodo-3.0/Mozilla/components/koInitService.py

<code> import sys
import os
                                                                              
from xpcom import components, nsError, ServerException, COMException
                                                                            
import locale, logging
log = logging.getLogger('koInitService')
import locale
locale.setlocale(locale.LC_NUMERIC, 'C')</code> 

I know you don't have to import locale twice, but that was your patch so
I did it for good measure.

RESULT CPU WHILE KEYING IN KEYBOARD INPUT:

top - 13:04:17 up  1:17,  2 users,  load average: 0.50, 0.56, 0.37
Tasks:  86 total,   1 running,  85 sleeping,   0 stopped,   0 zombie
Cpu(s): 72.2% us,  4.6% sy,  0.0% ni, 22.8% id,  0.0% wa,  0.3% hi, 
0.0% si
Mem:    255076k total,   251152k used,     3924k free,     2760k buffers
Swap:   511520k total,     4272k used,   507248k free,    71436k cached
                                                                                
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2521 beer      15   0  153m  41m  23m S 59.5 16.6   0:39.17 komodo-bin
 1633 root      15   0 95104  22m  74m S  5.6  9.1   1:51.11 X
 2405 beer      15   0 20832  12m  15m S  4.3  5.1   0:11.78
gnome-terminal
 2336 beer      15   0 16532 9848  14m S  1.7  3.9   0:06.09 wnck-apple

The CPU load seems a little better, but it's still not right. I now
suppose you made this application with python and the widget toolkit
instead of C. I can imagine keyboard and mouse interupts get slowed down
through the abstraction of passing through linux, then X, then the C UI
TK library, before finally being caught and processed by python code,
and I suspect that this is what's happening. I do all my linux UI in C
with GTK+ so it's not as bad. If you happen to improve it somehow, let
me know and I will be happy to test it again for you.

It appears to run well, the 2.5, on my windows machine though, so nice
job on the .exe version. Keep up the good work.
Chris R.

>  There is a real problem with non-English locale settings, but not sure 
>  what locale is in use.
>  
>  CR, can you look at this bug and see if the problem is the same and 
>  solution (last entry on the bug) works for you?
>  
>  http://bugs.activestate.com/show_bug.cgi?id=30327
>  
>  Regards,
>  Shane
>  
>  
Thread:
Beer
Vincent Danen
Shane Caraveo
Beer
Vincent Danen
Beer
Beer

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved