ActiveState Powered by ActiveState

ActiveState Community


High CPU usage when idle

Posted by JERichardson on 2008-03-24 14:17
OS: Windows

Creating PHP source using Komodo 4.3 on Windows with Perforce.

When idle (I'm not typing, not browsing, just watching Task Manager), Komodo is using 30-40% CPU time. It doesn't seem to be that way when I first start Komodo. But after a short time it just bogs the machine, makes the fan comes on high. Any ideas?

ToddW | Mon, 2008-03-24 14:54

Some things to check, in Komodo's "Source Code Control->Perforce" preferences:
* ensure the "Do recursive status checks" checkbox is unchecked, restart Komodo after unchecking and see if this helps
* if that makes no difference, uncheck the "Check for status changes outside of Komodo" and then restart Komodo.

Do either of these make any difference?

Thanks,
Todd

JERichardson | Tue, 2008-03-25 09:41

No change. After a while, Komodo jumps to double-digit CPU usage. I will restart and try to keep task manager open so that I can see what I'm doing when it starts to happen. But I'd welcome other suggestions, of course.

J

ToddW | Tue, 2008-03-25 10:13

To see if there are any errors occurring, please check the Komodo log files:
http://community.activestate.com/faq/komodo-file-locations#log_files

There could be errors relating to the high cpu usage reported in these log files.

Cheers,
Todd

jtinsky | Wed, 2008-03-26 11:39

I'm having the same issue with maxed CPU. It occurs as soon as I start editing anything. I'm editing an XML document currently but it happens in perl or python.

I have my source control turned off and I'm still barely able to use Komodo 4.3.

I've tried the above fixes and no joy. There are no entries in either pystderr.log or pystdout.log.

ToddW | Wed, 2008-03-26 11:58

Hi jtinksy, which platform are you using?

Thanks for checking the logs.

Are there any messages appearing on the Komodo statusbar, such as "Scanning files in...", which would mean the Komodo code intelligence engine is scanning files/directories for auto-completion information.

Thanks,
Todd

jtinsky | Wed, 2008-03-26 12:07

WinXP w/2 GB RAM.

Komodo IDE, version 4.3.0, build 15901, platform win32-x86.
Built on Thu Mar 06 04:46:09 2008.

No statusbar messages.

I unchecked "Enable automatic autocomplete..." and "Enable autocomplete fill-up characters" and restarted and I'm having the same issue. Simply adding a tab to a line causes Komodo to spike to 90+ percent CPU with frequent spikes to 100%.

JERichardson | Wed, 2008-03-26 12:06

Komodo just jumped up to 30% CPU usage a few minutes ago. My log files are empty. I was using Komodo very little today until recently when I made a very small change in 7 different files. Then I noticed CPU usage had jumped and I checked the log files.

Joseph

ToddW | Wed, 2008-03-26 12:16

If you can, please try installing and using the 4.3.1 release:
http://downloads.activestate.com/Komodo/releases/4.3.1/

Note: Komodo 4.3.1 is not fully released yet (i.e. the announcements have not gone out and the auto-update is not yet turned on), but it is the official 4.3.1 release.

Thanks,
Todd

jtinsky | Wed, 2008-03-26 12:41

Thanks for the update. Sadly I'm still seeing CPU usage through the roof on simple line indentation.

ToddW | Wed, 2008-03-26 12:59

jtinsky, which file type is this (Perl, Python)? Does this happen on a new empty files as well?

Thanks,
Todd

jtinsky | Wed, 2008-03-26 13:06

I'm working on XML and Perl files. Both are rather large. The XML file is 18,850 lines long.

The Perl file is 2400 lines long. Both have the same issues.

I created a test.txt file, copied a line of text into it and did various formatting operations on the file and never noticed the same sort of lag.

In my source control options Perforce is checked but grayed out because I don't have it installed. SVN is the same. I DO have CVS installed but the checkbox for it is unchecked.

ToddW | Wed, 2008-03-26 13:40

I think this may be a large file size issue, which there is little that can be done to tweak, apart from using smaller files (likely something that is not possible for most users).

I'd recommend logging a bug on this at:
http://bugs.activestate.com/enter_bug.cgi?product=komodo

Certainly the xml file would be very slow to edit inside of Komodo (due to the large volume of data it will be using for determining completions, syntax checking, etc...). I'm a little surprised that the perl file (2400 lines) is slow though, do you have wordwrap enabled?

Todd.

JERichardson | Wed, 2008-03-26 12:46

Agree with jtinsky. 4.3.1 didn't help. It seems to happen for me when I check out a bunch of files. I checked out 6-7 files and the CPU usage kept creeping up even though I wasn't editing on anything. Reverted all the files so that nothing was checked out and I'm sitting here looking at CPU usage jumping between 10 and 25 while I'm doing nothing.

ToddW | Wed, 2008-03-26 12:58

Joseph, can you try turning off the SCC integration for Perforce, Subversion and CVS (all three of them) and then restarting Komodo. Does this make a difference?

What types of files are you editing (PHP, Perl, Python)?

Thanks,
Todd

JERichardson | Wed, 2008-03-26 13:01

I can turn off SCC for Perforce but Subversion and CVS are checked and greyed out. I will try anyway.

Editing PHP files.

J

JERichardson | Wed, 2008-03-26 14:08

When I turned off the Perforce integration, I could open and close lots of file and the CPU usage didn't creep up. When I turned Perforce integration back on and started checking out files, the CPU usage kept going up and stayed up.

ToddW | Wed, 2008-03-26 14:16

Joseph, can you tell me what your Komodo perforce preferences are, i.e. for these settings:

"Check for status changes outside of Komodo"
"Check every N minutes"
"Do recursive status checks"

Do you have any Komodo projects opened that reference the perforce files? If yes, how many files/folders are there referenced?

Thanks,
Todd

JERichardson | Wed, 2008-03-26 14:28

"Check for status changes outside of Komodo" - unchecked
"Check every N minutes" - '15' (but it's greyed out)
"Do recursive status checks" - unchecked (also, greyed out)

I have one project I work in. All the files for my work are in this one project. Not sure how many files. ~1000 maybe.

ToddW | Thu, 2008-03-27 11:36

Joseph,

I think this may be somehow related to the following SCC bug:
http://bugs.activestate.com/show_bug.cgi?id=75961

I'll be looking into this more today, please add any additional details you can think of to the bug report as they come to mind.

Thanks,
Todd

JERichardson | Fri, 2008-04-04 07:27

Todd,

Just checking to see if you have found out anything more about this problem.

Thanks,

Joseph

ToddW | Fri, 2008-04-04 09:00

This was due to a bug in Komodo's SCC caching, which resulted in the SCC status checks (i.e. "svn status") to occur too frequently and use up a lot of CPU. See the bug for the full details:
http://bugs.activestate.com/show_bug.cgi?id=75961

This will be fixed with the Komodo 4.3.2 release (likely second week of April, 2008).

Cheers,
Todd

JERichardson | Fri, 2008-04-04 12:00

Excellent. Thanks so much. I will look forward to that release.

Joseph

neongrau | Fri, 2008-04-11 02:17

after a while (that while seems to get shorter every day) there is a csrdd.exe process appearing that constantly eats 60-80% and komodo.exe using another 10-30% cpu.

thanks to procexp (from sysinternals) i was able to track it down to find out it was caused svn.exe and komodo.exe.

i just had subversion reenabled after it was unusable with large numbers of files in a project, now i had to disable it again *sigh*

ToddW | Fri, 2008-04-11 12:05

Update: we are expecting to have Komodo 4.3.2 released on Monday 14th April, which will fix this high cpu problem.

Thanks for your patience,
Todd.

JERichardson | Wed, 2008-04-16 12:24

I see 4.3.2 is available on the download site. Can I assume that it's ok to download and install it to try and fix my CPU usage issue?

Joseph

Yes
ToddW | Wed, 2008-04-16 13:19

The Komodo 4.3.2 has made a number of improvements to help address the SCC high CPU usage problems.

You should be able to use the Komodo "Help->Check for updates" menu to auto-update, or use the direct download link below:
http://downloads.activestate.com/Komodo/releases/latest/

Cheers,
Todd

JERichardson | Wed, 2008-04-16 13:38

As I said in the subject line....

This is really killing me. Is there something else we can do?

J

ToddW | Thu, 2008-04-17 09:58

The CPU symptoms you are experiencing are still the same now? Or there was some improvement but it's still not the same as it was with Komodo 4.2?

I'll be doing some more testing on this today to hopefully discover any other issues relating to the scc performance.

Thanks,
Todd

ToddW | Thu, 2008-04-17 11:44

Comparing Komodo versions (4.2.1 to 4.3.2) I notice that the SCC status checking on large projects (projects with lots of scc files), the Komodo 4.3.2 version is indeed a lot slower than the Komodo 4.2.1 version when updating the SCC status (during scrolling the project view, and periodic status checks).

I'll continue my investigations and will hopefully have some better explanations and/or fixes to this problem.

Cheers,
Todd

zacc | Thu, 2008-04-17 11:25

I've been experiencing high cpu usage on my machine running IDE 4.3.1, and have been watching this thread with interest waiting for 4.3.2 to arrive - which I quickly downloaded as soon as it became available. However, it doesn't appear to have fixed the problem - although the problem does appear to have morphed.

Firstly, my set-up - I'm using Komodo IDE to facilitate the development of a Perl based web-app, which compromises about 50 assorted .pl and .pm files. Running on Vista (spit) Home Premium dual-core laptop with 2GB ram on board, I typically have two or three different projects open, with approx 70-100 files across the projects and typically four or five files open for modification. I'm using SVN, with the repository running on a separate server.

What I'm seeing is this ..... when I'm constantly clacking away on the keyboard, CPU stays calm - but when I stop keying and allow the syntax checker to kick in (I've got the checker set to a 15 second delay atm) the CPU usage increase a little as the checker runs - but as soon as the checker finishes (and I get the green tick or, more often than not :-) the red exclamation mark) the CPU goes ballistic.

If the laptop is not connected to a network, the CPU runs 100% on one CPU for about 20 seconds. If I'm connected to the net (either 3G dialup internet or direct the network hosting the SVN server) - it stays high for about almost exactly 90 seconds (I've timed about two dozen runs so far).

To rule out a problem with SVN server, I've been using SmartSVN client on laptop to browser the repository during these hangs, and it flys - with no impact on the Komodo thrash timeout.

If, half way thru the 90 seconds cpu thrash, I type on the keyboard Komodo rechecks the code fine (albeit a little sluggishly) and the 90 seconds cpu thrash completes as expected at the 90 second mark from the original check finishing and not 90 seconds from time that the second check finished.

I've just checked the problem on another, more powerful (again dual core) machine and the trash periods are slightly less, but still consistent between like for like runs.

ToddW | Thu, 2008-04-17 11:40

Hi Zacc, thanks for the input.

It is hard to tell whether this problem is stemming from the "scc status checking" or from the "perl syntax checking" (two separate components).

The scc status checking only fires on specific events like an "on-focus", "file-save", "periodic x mins check"), whilst the syntax checker always fires from document on-modify events. Also, it should not matter if you are connect to the network or not as the Komodo svn status checks are always offline except in the cause of an explicit "Refresh Status" command.

To find out which one is causing the problem, could you disable the subversion integration inside of Komodo and restart. Do you still have any CPU performance problems?

Thanks,
Todd

JERichardson | Thu, 2008-04-17 11:45

If the update has modified Komodo's behavior or improved the situation, I can not detect it. As I check files out and then in again, CPU usage creeps up and up.

J

JERichardson | Thu, 2008-04-17 12:14

I think I have to modify my "no difference" statement. I've been playing with it more and I would say that the problem still exists but the CPU usage accretes at a much slower rate. That is, instead of checking out 20 files, I have to check out 60 files to overwhelm the CPU. (The files are not necessarily checked out all at the same time.)

J

ToddW | Thu, 2008-04-17 12:16

Nod, thanks for confirming that. I've been comparing Komodo versions (4.2.1 to 4.3.2) and I notice that the SCC status checking on large projects (projects with lots of scc files), the Komodo 4.3.2 version is indeed a lot slower than the Komodo 4.2.1 version when updating the SCC status (during scrolling the project view, and periodic status checks).

I'll continue my investigations and will hopefully have some better explanations and/or fixes to this problem.

Cheers,
Todd

zacc | Thu, 2008-04-17 12:21

Ok, have disabled SVN and restarted the IDE. The CPU still thrashes, but only for about 10 seconds. Reactivated SVN and restarted - thrashing is down to 10 seconds as well, but playing with the IDE for 20 minutes, the thrash seems to get a little longer as the time that Komodo is being used passes.

I've also been playing with the "checking for off-line changes" to see what happens there.... and it picks up notepad initiated changes to the files fine and doesn't cause the CPU thrash.

Commiting files also seems to cause the thrash to occur - and causes the thrash time to increase significantly. In fact, checking a file in causes the CPU effort to become highly erratic - some 3 minutes after checking a file in Komodo is intermittently 20/40/30% cpu usage (never much below 5%)... it's obviously getting it's knickers in a twist about something. Some 10 minutes later and it's still flicking between "idle" and 7% usage every couple of seconds (with the occassional flick to 20%+).

Memory usage is also creeping up.

JERichardson | Tue, 2008-05-06 18:20

Just wondering if you've been able to find out anything else about this problem. It's definitely still an issue for me; I would say it's more than an annoyance, but less than debilitating.

Joseph

zacc | Tue, 2008-05-06 23:12

The latest 4.4a1 release has the same problems.

ToddW | Fri, 2008-05-09 18:36

I have found a few things that need some tweaking, which I'm working on adding to the Komodo 4.4.0a2 build (and then possibly back ported to the 4.3.3 build).

I'll post the details to the bug (http://bugs.activestate.com/show_bug.cgi?id=75961) when I've finished with the patches for it.

Cheers,
Todd

JERichardson | Tue, 2008-06-17 13:57

I'm in the middle of an intense stretch of coding and this problem is driving me nuts. Any news on some kind of fix, workaround, anything?

Joseph

ToddW | Tue, 2008-06-17 15:29

Hi Joseph,

There have been a number of changes made in Komodo's development tree to work this problem out. If this is proving to be a major distraction to your daily work, then I recommend either going back to the Komodo IDE 4.2.1 build or trying the Komodo 4.4.0b1 (beta) build, both found here:
http://downloads.activestate.com/Komodo/releases/

Cheers,
Todd

-->