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 145907 - 100-180% CPU load on multi-CPU system when "idle"
Summary: 100-180% CPU load on multi-CPU system when "idle"
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-02 12:58 UTC by eskild
Modified: 2008-09-05 06:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread stack dumps (87.85 KB, text/plain)
2008-09-02 12:58 UTC, eskild
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eskild 2008-09-02 12:58:04 UTC
I'm running a pretty normal editing session with a few C++ projects open. NB sits at 100% CPU on my 4-CPU system, even
though it's "idle" from a user point-of-view: I'm not touching it, it's not (saying it's) parsing anything --
tranquility all around.

Then, when I start using the editor, CPU usage will grow, sometimes peaking at up to 180%, other times levelling at
around 140-160% CPU.

I've taken a few stack dumps with a one-two second interval; I'll attach them to this report.

The load makes NB somewhat less pleasant to use; therefore I've set initial priority to P2.
Comment 1 eskild 2008-09-02 12:58:52 UTC
Created attachment 68866 [details]
Thread stack dumps
Comment 2 Vladimir Voskresensky 2008-09-02 13:46:46 UTC
what is NB version? Trunk?
Comment 3 eskild 2008-09-02 14:07:47 UTC
No, 6.5beta.

I can try it with the trunk as well; I'll let you know.
Comment 4 Vladimir Voskresensky 2008-09-02 14:30:30 UTC
Yes, please, 
because seems, like duplication of fixed http://www.netbeans.org/issues/show_bug.cgi?id=143281
Comment 5 eskild 2008-09-02 14:32:23 UTC
Just downloaded trunk; looks better. I'll use it for the next day or so and see if the problem manifests itself again.
If it doesn't, I'll close the case.
Comment 6 Vladimir Voskresensky 2008-09-02 14:58:26 UTC
thank you!
Vladimir.
Comment 7 eskild 2008-09-02 15:07:17 UTC
Uh oh... I have a .cc file of around 11,500 lines (auto-generated, hand-modified, sigh), and each time I type a *single
character* in the editor, the load spikes up to 100% and stays there for more than 70 seconds (the box has 4 Opteron CPUs).

I'm not certain it's the exact same problem that I reported in this IZ, because there it looked like the load was
continuously high. But maybe I just didn't wait for a full 70 seconds between keypresses, I'm unfortunately not sure.

Turning off code assistance for the file solves the issue.

So, perhaps it's "just" poor performance for a large file and not a clear-cut bug.
Comment 8 Vladimir Voskresensky 2008-09-04 14:08:23 UTC
Ok, thanks. Generated files are always problem for IDEs. 
As workaround I turned OFF expensive (from performance point of view) features for files > 4000 lines.

This can be changed by setting flag "cnd.semantic.max.line" 
values <0 turn OFF limitation, 
positive values change default 4000 lines limit to new one

http://hg.netbeans.org/main?cmd=changeset;node=a5cbcb0669f3
Comment 9 Quality Engineering 2008-09-05 06:21:08 UTC
Integrated into 'main-golden', will be available in build *200809050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a5cbcb0669f3
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed IZ#145907: 100-180% CPU load on multi-CPU system when 'idle'