Stop parsing when keyboard activity detected

Is there any way to persuade IDEA to stop parsing when I press a key? A large Java source file (3,000 lines) can take several seconds to parse. Anytime I make a change and then exceed the autoparse delay, IDEA will not respond to keyboard activity for several seconds until parsing completes. This makes editing a large file difficult since this happens many times during an editing session. I would prefer that priority be given to responding to user input rather than up-to-date parse data.

I'm running Maia 90.193 on Windows XP SP3.

Any suggestions appreciated.

Thanks.

4 comments
Comment actions Permalink

Chris,

Your desired behavior is how it works right now.  As soon as I press a key, the syntax/error parse gets suspended immediately.  If you are seeing a couple second delay after pressing a key, the possible reasons are (1) you don't have enough memory allocated to IDEA JVM, and the inspection/error parse on a large file is causing GC to kick in, which would make response sluggish. You can check memory usage in bottom right ocrner , e.g. 734m of 944m and compare to setting in bin/idea.vmoptions.  (2) your system itself doesn't have enough memory and too much swap or pagefile is being used which would also make the system sluggish or (3) (least likely) there is a bug in IDEA.  One thing you can do is click on mr. inspector icon in the taskbar and change Highlighting level from Inspection to Syntax or to None and see how that affects the behavior.

I have the complete opposite problem of you --  I don't want IDEA to stop the file parsing on keyclick or mouseclick if it doesn't result in an edit to the file.  If you have a multicore workstation, it has horsepower to parse the file while you are doing something else.

-Alex

0
Comment actions Permalink

Thanks for the info Alex. That's very helpful. I think I have enough memory. My system has 4GB and I am giving IDEA up to 1GB. Processor is dual-core x86 3.0 GHz. My current usage while I'm seeing the problem is 162M of 291M. From my idea.exe.vmoptions file:

-server
-Dsun.awt.keepWorkingSetOnMinimize=true
-Xms256m
-Xmx1024m
-XX:MaxPermSize=150m
-ea
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled

The file I'm editing is a java source of 3,100 lines. It's poorly written and inspections make the entire right margin almost solid yellow. If I press a key and wait for the autoparse delay time, my CPU goes to 100% for about 13 seconds.

It's only a few files I see this problem on. It may be a particular construct or inspection that is more the trigger than just the file size.

Your suggestion about clicking Mr. Inspector accomplishes what I need. It's kind of embarrassing, but I have gotten so used to clicking him, then immediately clicking the "Configure Inspections" link, that I completely overlooked the fact that there is a slider bar there that lets me disable parsing altogether. :-)

Thanks again.

0
Comment actions Permalink

Could you please take a CPU snapshot?
The instructions are here: http://www.jetbrains.net/devnet/docs/1087

Thanks,
Anton Makeev

0
Comment actions Permalink

Thanks Anton.

I uploaded a CPU snapshot and supporting information to cbritton-devnet-thread-284964.zip. Let me know if I can provide additional information.

Thanks again.

0

Please sign in to leave a comment.