This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179137 - Netbeans utilizes more than 100% CPU during parsing and completely nonresponsive
Summary: Netbeans utilizes more than 100% CPU during parsing and completely nonresponsive
Status: RESOLVED INCOMPLETE
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-31 02:23 UTC by sumanta679
Modified: 2010-04-24 05:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
threaddump (87.23 KB, text/x-log)
2010-01-04 23:56 UTC, sumanta679
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sumanta679 2009-12-31 02:23:29 UTC
I am working on a large C/C++ project and using netbeans for it. Every now and then netbeans fires up parser and goes totally nonresponsive for more than 10 minutes or so. It utilizes more than 100% CPU on a Ubuntu machine with 16 cores and cloggs up all the 8 Gig memory. Unbelievably bad performance, I am having tough time and seriously thinking of switching IDE.

Attaching the threaddump, and pasting the output of top command.

21231 sumansah  18  -2 1333m 738m  18m S  668  3.1   2:16.95 java                                                                            19621 sumansah  18  -2  195m  17m 9968 S    4  0.1   0:02.74 gnome-terminal
Comment 1 Jindrich Sedek 2010-01-04 01:37:11 UTC
The threaddump would be good. Also try using profile me feature and submit CPU snapshot. Thanks 

http://wiki.netbeans.org/FitnessViaPartnership

Reassigning to cnd
Comment 2 Vladimir Voskresensky 2010-01-04 01:53:47 UTC
How large is your project? (number of source/header files)
Seems you have forgot to attach mentioned thread dump.
Can you try with fresh userdir and without importing settings from prev NB?

About trying utilizing 6 cores from your 16 - you have max 1600% CPU :-)
You can restrict usage of cores with startup parameter -J-Dcnd.modelimpl.parser.threads=2

Btw, why do you think about eating 8Gb. in your output top shows 1Gb used by NB
Comment 3 Vladimir Voskresensky 2010-01-04 01:55:29 UTC
Can you try Tools->Options->C++->Highlighting and uncheck "Reparse of file change"

Thanks,
Vladimir
Comment 4 sumanta679 2010-01-04 23:56:21 UTC
Created attachment 93066 [details]
threaddump

errr, I actually added the thread dump during bug filing also. For some reason, it was not uploaded may be. I am attaching it again...
Comment 5 sumanta679 2010-01-05 00:03:29 UTC
>How large is your project? (number of source/header files)
I am afraid I can't divulge that information. Its quite a big project regarding the software of a large equipment manufacturer.

>Seems you have forgot to attach mentioned thread dump.
sorry about that. I did browsed the path of the threaddump, but for some reason it wasn't attached. I have attached it again.

>Can you try with fresh userdir and without importing settings from prev NB?
I have created fresh userdir and checked out the code from svn several times, with no improvement of performance.

>About trying utilizing 6 cores from your 16 - you have max 1600% CPU :-)
really, that good. But still the performance of netbeans is horrible, and I often have to just sit idle for 10 mins waiting for netbeans to stop parsing.

>Can you try Tools->Options->C++->Highlighting and uncheck "Reparse of file
>change"
I actually tried that yesterday, and it seems to somewhat improve the situation a little bit, not in a drastic way though.

>Btw, why do you think about eating 8Gb. in your output top shows 1Gb used by NB
probably the instance when I took the dump, it was 1 GB, but it also happened that the whole machine crashed due to "out of memory" problem, and all there running was a couple instances of netbeans from a couple of users. And by a couple, I literally mean a couple, not a dozen or so.
Comment 6 Vladimir Voskresensky 2010-04-19 22:44:46 UTC
We have fixed some performance and memory issues in 6.9
Can you evaluate daily build, please?
http://bits.netbeans.org/download/trunk/nightly/latest/

+ use -J-Dcnd.modelimpl.parser.threads=4 to reduce number of parser threads
Comment 7 Vladimir Voskresensky 2010-04-19 22:46:11 UTC
editor has some problems now => use 
-J-Dorg.netbeans.editor.linewrap=false
to disable instability
Comment 8 sumanta679 2010-04-23 10:20:56 UTC
(In reply to comment #6)
> We have fixed some performance and memory issues in 6.9
> Can you evaluate daily build, please?
> http://bits.netbeans.org/download/trunk/nightly/latest/
> 
> + use -J-Dcnd.modelimpl.parser.threads=4 to reduce number of parser threads

I have used the nightly build for several weeks and the performance was not good at all. The indexing seems to kick up whenever it detects some activity in the editor (result was, there wasn't any parsing when I was not doing anything, and it started parsing whenever I tried to do some coding, completely stopping me from doing anything). I tried to bear with it for some period of time, and then gave up.
Switched to eclipse. The performance is splendid, indexes very intelligently, without any blocking effect on the IDE. Happy with it.

Sorry guys, but just couldn't continue with Netbeans when I had to wait for it to respond 50% of my work time.

best wishes...
Comment 9 Vladimir Voskresensky 2010-04-23 19:28:29 UTC
Hi,
Thanks for help anyway.
What were the "indexing" messages?
Is it "Checking for external changes" or "Parsing project" or "Scanning project"?

Thanks,
Vladimir.
Comment 10 sumanta679 2010-04-24 05:33:42 UTC
(In reply to comment #9)
> Hi,
> Thanks for help anyway.
> What were the "indexing" messages?
> Is it "Checking for external changes" or "Parsing project" or "Scanning
> project"?
> 
> Thanks,
> Vladimir.

Hi,
The indexing message was "Parsing project".

Best,
Sumanta