History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-14683
Type: New Feature New Feature
Status: Open Open
Assignee: Alexey Kudravtsev
Reporter: AlexL
Votes: 3
Watchers: 6
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Optimize Editor Syntax/Inspection parse for multi-cores, limit autoreparse delay to only 1 out of n cores.

Created: 01 Sep 07 07:13   Updated: 28 Nov 07 02:32
Component/s: Editor. Error Highlighting

Environment: Windows XP SP2

Build: 7,241
Severity: High


 Description  « Hide
I really like the almost 2X speedup in the syntax and inspections parse when I load a file into the Editor. When I load a file, I can see both of my dual cpu% spike to 100%.

However, I noticed that if I jump to a file and then start navigating around the file, then the syntax/inspections parse gets stalled. I know this was done to make IDEA responsive when the user is interacting with it.

There is an autoreparse delay setting which I have set to 100 ms (I think the default is 300ms). So 100ms after I stop hitting a key in the Editor pane, I see both cpus kick back to 100% until the syntax/inspections parse is complete.

You can see the current behavior better if you change your auto-reparse delay setting to a larger number like 500 ms. Load a large file, and immediately start navigating around. On my machine, I see cpu only around 10%. Then if I stop navigating around, then the cpu shoots up to 100% as the parsing threads start again.

I think if you are running multi-core, then only 1 of your processors should be subject to stalling on user input, and forced to wait for the autoreparse delay before resuming.

The other n-1 threads should continue to parse the current editor file, unless the user loads a different file.

So if you have dual-core, then 1 process thread should continue the parse, and only the remaining processor should be subject to the autoreparse delay. If I have quad-core, then 3 process threads should continue to parse uninterrupted by user keypresses, and the remaining process thread will kick in if I stop pressing keys for more than autoreparse delay.

Doing the above we give us the maximum performance boost for dual core and quad core workstations running IDEA..



 All   Comments   Work Log   Change History      Sort Order:
Lothsahn - 28 Nov 07 02:32
Making the multi-core change as you recommend would bring my system to a halt, as Idea would eat all of my CPU which I need for other processes. The inspections take 3-4 seconds on my system, because our codebase is so large and I have many inspections loaded.

I like the editor parsing with multi-cores, but please don't make it constantly reparse on my other CPU's.

I've set the delay to 1000ms because the parsing lags the system and the editor pane so badly.

If you're having editor stutter, you might consider raising your delay. 100 ms seems VERY low.