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 40720 - 100% CPU time when running 3.6 beta
Summary: 100% CPU time when running 3.6 beta
Status: CLOSED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-03-03 11:27 UTC by peircek
Modified: 2011-05-25 11:36 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NB3.6 Beta 100% CPU exception dumps from CMD console. (52.32 KB, text/plain)
2004-03-08 16:09 UTC, peircek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peircek 2004-03-03 11:27:43 UTC
(Apologies if this is the wrong route - I 
couldn't find any 3.6 beta feedback links)

I'm running Windows 2000 Service Pack 4 on a Dell 
C640 laptop with 512Mb RAM.  CPU is a 1.8GHz 
Mobile Pentium 4.

With mains power connected, when running the Beta 
of NB 3.6 my CPU regularly ramps up to 100% and 
effectively freezes my PC.  This lasts for around 
5 to 10 seconds then Netbeans decides things are 
OK and it start's working again.  This is happens 
every few seconds so I actually get very little 
nicely interactive usage out of Netbeans.

JDK that the IDE uses is  JDK1.4.2.

I've noticed things seems to be especially bad 
when using the Java editor.

Any more questions or stuff you want me to try, 
feel free to ask.
Comment 1 Tomas Zezula 2004-03-04 12:43:10 UTC
No projects issue. 
Could anyone from performance team take a look on it?
Comment 2 _ ttran 2004-03-05 08:44:44 UTC
looks pretty bad, but hard to say what can be a problem.  We need the
thread dump at the moment when the CPU goes up to 100%.  Please run
the IDE from the console window next time and when you notice similar
situations, quickly switch to the console, press Ctrl+Break and attach
the printed thread dump to the report.

It's good if you can produce several thread dumps and attach them all
here.
Comment 3 Antonin Nebuzelsky 2004-03-08 14:33:58 UTC
Kevin, we need your cooperation. Otherwise we'll have to close the bug
as worksforme.

Please, give us the thread dump, or at least specify some concrete
steps to help us reproduce the bad state.
Comment 4 peircek 2004-03-08 16:09:47 UTC
Created attachment 13877 [details]
NB3.6 Beta 100% CPU exception dumps from CMD console.
Comment 5 peircek 2004-03-08 16:11:52 UTC
Sorry for the delay - I only use NB at work so could do nothing about 
it over the weekend.

I've just attached a file with the exceptions from the DOS CMD window 
as requested.

I've done the CTRL+BREAK in several situations (all noted within the 
TXT file) as NB seems to go into 100% CPU most of the time.

Kind regards.
Comment 6 Antonin Nebuzelsky 2004-03-09 20:20:22 UTC
High CPU utilization right after IDE startup is usually caused by
"warmup". This should take just a few seconds but on some
configurations it may take even more than ten seconds. You can see
issue 39626 and issue 40232 for comments on warmup.

CPU utilization when a file is opened in the editor and for a few
moments after the file is displayed in the editor is caused by
computation of layout of all lines of the file and adjusting of
scrollbars. This should take very small amount of time and should be
visible only with especially large files. Do you open especially large
files? Do you open large amount of files at once?

First opening of code completion window may take around a second.
That's what we measure on our testing machines. And these machines are
old 800MHz PIII. Does it take much longer for you?

Beside warmup there are also other background tasks which may cause
high CPU utilization effectively blocking GUI. These are code
completion database initialization (e.g. when a new filesystem is
mounted), searching in filesystems (CTRL+F in Explorer window),
tasklist scanning (in To Do window) or refreshing of a VCS filesystem
(after mount or on a user action). However, these tasks should not
come into play when you just simply edit a file in the editor. Do you
think any of these could be the cause of the problem you encounter?

Do you encounter the high CPU utilization during longer time of work
with the IDE? Is the problem preceded by project switching, mounting a
new filesystem or anything else I mention above?

Thanks for the information.
Comment 7 peircek 2004-03-10 08:41:28 UTC
Hi,

Firstly - thanks for looking at this, and I'm not complaining for the 
sake of it, just trying to provide feedback so sorry if I have 
sounded and continue further on to sound picky!  *blush* :)

I've used NB3.5 on the same PC extensively (and 3.4) so I understand 
what you mean by the delays when a file is opened, first opening of 
code completion window, etc.

In order of your questions.

1) File opening: Always seemed OK in 3.5 - now takes an age in 3.6.  
I normally have just one or two files left open when I start up 
Netbeans and I never open multiple files from the file explorer bar.

2) Yeah, in NB3.5 I know what you mean by a brief pause on first load 
(it's the same with the drop down list of methods) - but it always 
does it every time the completion window is loaded.  Once loaded, it 
locks again when I, for example, then press the 'g' key to filter the 
list down to all my 'get' methods.

3) Code Completion Database: As a rule, when into a project I don't 
mount new JARs, etc so I've not had a chance to check this.  Likewise 
for searching.

4) The latest beta for tasklist in NB3.5 runs really well with no 
noticable delays.  It does the business in NB3.6 too but does it add 
the problem?  I don't know.

5) We use an external CVS client so I've never had chance to flex 
NB's VCS muscles.

6) The 100% symptoms start right away. Out of interest, I switched on 
the memory bar on 3.6 and it was only using about half the allocated 
memory.  (The NB3.6 memory settings in ide.cfg were imported from my 
3.5 ide.cfg file automatically during installation.)

Hmmm...hope that clears up a few things.

KP.
Comment 8 estroh 2004-03-11 19:53:28 UTC
Let me add another data point to this debate.

I have been experiencing the same symptoms as Kevin.  The issue is 
CPU usage, not memory usage.  It is not just a startup issue -- 
actually, it makes the IDE unusable in my case (happens every few 
minutes).  Here's the kicker: not only was 3.5 working fine on my 
machine, but 3.6 beta was also working fine on my machine until the 
last couple of days.  I have a 2.53GHz machine, and this happens even 
when other applications are using very little of my CPU, so it is not 
just an issue processing power.

I am using external ClearCase for version control, so my guess is 
that the CVS module is not responsible for this.  I have been doing 
some unusual things in the filesystems view: having a directory as a 
root of one filesystem and one of its subsubdirectories as a root of 
another filesystem.  I was also using DnD in the filesystems view to 
move several Java files around when I first noticed these symptoms.  
However, now the symptoms occur even with non-overlapping filesystems 
and with no DnD involved.

P.S.: Today, when I started up NetBeans, I got a message about 
another user currently using my project tree (or something like 
this).  This is the only time I ever saw this message, but it might 
be related.
Comment 9 estroh 2004-03-16 02:24:43 UTC
Following Rich Unger's advice, I unchecked "Use in Compiler" and "Use 
for Execution" on all of my filesystems.  For some reason, this made 
the CPU problems go away -- I haven't experienced them after making 
this change.
Comment 10 Antonin Nebuzelsky 2004-09-16 14:24:18 UTC
I assume this is not a problem in trunk anymore... Marking as fixed in
4.0 after the huge changes in project system and java core.
Comment 11 Marian Mirilovic 2005-12-14 16:11:03 UTC
verified - closed