Project
IntelliJ IDEA
Priority
Normal
Type
Performance Problem
Fix versions
No Fix versions
State
Open
Assignee
Maxim Shafirov
Subsystem
User Interface
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Esko Luontola
    3 years ago (09 Aug 2008 22:50)
  • Updated by   Kevin Corcoran
    2 years ago (05 Jan 2010 03:36)
  • Jira: IDEA-19066
    (history, comments)
 
IDEA-19066 100% CPU usage when focus moves back to IDEA
3
Issue is visible to: All Users
  The issue is visible to the selected user group only
I've uploaded a CPU snapshot "7938_ORFJackal_09.08.2008_20.41.00.zip" which records how IDEA has 100% CPU usage (25% on quad-core) and the UI is unresponsive for a couple of seconds after moving focus back to IDEA.

When taking the CPU snapshot, I pressed the record button, moved focus to another application, moved focus back to IDEA, then IDEA was unresponsive for some seconds, and after regaining responsiveness I stopped the CPU recording. I did not have antivirus running in the background and system restore was disabled on all drives.

Environment: WinXP, Core 2 Quad Q6600
Comments (8)
 
History
 
Linked Issues (?)
 
Esko Luontola
  Esko Luontola
09 Aug 2008 22:58
3 years ago
The unresponsiveness seemed to go away when I closed a Jetty server which was running at the same time. The Jetty server was part of the same project and was started with Maven (mvn jetty:run-war, see http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin). The server's log was written to a .log file under Maven's target dir (at that time it was around 8MB).
Esko Luontola
  Esko Luontola
09 Aug 2008 23:39
3 years ago
It seems that this was caused by that log file in one of the project folders. When IDEA gains focus, it notices that the file was changed and reads it from disk, which causes visible unresponsiveness when the log file is about 2MB or larger. Moving the log file to a directly which is excluded from the project (for example "/target/logs") solved the issue.

Should something be done about this behaviour?
Maxim Shafirov
  Maxim Shafirov
13 Aug 2008 19:29
3 years ago
Would you please check if TODO patterns in Settings|TODO are somewhat unusual, I mean regexps, that are expensive to find matches of, like .*something.* ?
Esko Luontola
  Esko Luontola
13 Aug 2008 23:56
3 years ago
These are all of my TODO patterns:

\btodo\b.*
\bhack\b.*
\bfixme\b.*
\bxxx\b.*
Dave Lorde
  Dave Lorde
30 Jan 2009 17:56
3 years ago
I have noticed a similar problem on all IDEA 8 versions - when I switch away from IDEA to another application, IDEA CPU usage rises to 50% for about 7 seconds. During this period, the IDEA IDE is unresponsive if you switch back to it. This means that clicking on another application then immediately moving back to IDEA (for example, after checking a document or browser) always incurs a 7 second delay. This can be incredibly frustrating.
Nathan Brown
  Nathan Brown
04 Feb 2009 16:23
3 years ago
I was seeing a similar thing and I did a cpu snaphot of IDEA when this happened. There was a largish chunk of time used by ChangeListManager.isIgnoredFile() and I noticed I had a few hundred unversioned files... so I got rid of some of these by ignoring them and the problem seems much less worse - only a pause of a second max.
Also org.jivesoftware.smack.PacketReader seems to use a lot of background cpu, and I think this comes from IDETalk, so if you don't use IDETalk maybe disabling that will help?
Nathan Brown
  Nathan Brown
04 Feb 2009 16:28
3 years ago
CPU snapshot taken when switching focus with a few hundred unversioned files in change window.
Dmitry Jemerov
  Dmitry Jemerov
04 Feb 2009 17:04
3 years ago
IDEtalk doesn't actually consume much CPU - it just sits waiting for incoming traffic, and YourKit counts the wait time as the time spent in the method.
Kevin Corcoran
  Kevin Corcoran
05 Jan 2010 03:34
2 years ago
<Comment was deleted>
Related Changes
Type
Usability problemCosmetics
Affected version
<lost change>