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 39626 - IDE consumes 100% CPU in 10 seconds after startup
Summary: IDE consumes 100% CPU in 10 seconds after startup
Status: CLOSED INVALID
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords: PERFORMANCE
Depends on: 41192
Blocks: 40232
  Show dependency tree
 
Reported: 2004-02-05 09:45 UTC by ehucka
Modified: 2011-05-25 11:36 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2004-02-05 09:45:05 UTC
Build 200402042045

I started IDE without any mounted filesystem and
without opened documents (clear userdir)
There is used 100% of CPU in the first few seconds
(10) after the GUI of IDE is painted.
It doesn't look good.
Comment 1 Marian Mirilovic 2004-02-06 11:01:48 UTC
Warmup :(

Maybe, now is the right time to check what we are warming up for 3.6,
what we want vs. what is really neccessary.

I've seen the same bahviour, it seems like our warm up time is still
longer, so good hint to have test - to measure warm up time.

Radim or Tonda, can you look at it?
Comment 2 _ rkubacki 2004-02-10 12:47:48 UTC
The biggest part of warmup belongs to editor now. With some tracking
messages it gives these numbers (Dell notebook - P4, 2GHz, 1GB,
J2sdk1.4.2_03, Linux RedHat9) -

clean userdir, warm start:
[org.netbeans.core.WarmUpSupport] starting...
@19398 - Warmup started
  @19404 - running org.netbeans.modules.java.JavaWarmUpTask dT=6
  @20113 - running org.netbeans.core.ui.ContextMenuWarmUpTask dT=709
  @21283 - running org.netbeans.core.ui.DnDWarmUpTask dT=1170
  @21285 - running org.netbeans.core.ui.MenuWarmUpTask dT=2
  @25382 - running org.netbeans.modules.editor.EditorWarmUpTask dT=4097
[org.netbeans.core.WarmUpSupport] done
@27796 - Warmup finished, took 8398ms


Closed welcome screen, Java (and text) editor opened
[org.netbeans.core.WarmUpSupport] starting...
@24621 - Warmup started
  @24627 - running org.netbeans.modules.java.JavaWarmUpTask dT=6
  @24704 - running org.netbeans.core.ui.ContextMenuWarmUpTask dT=77
  @24956 - running org.netbeans.core.ui.DnDWarmUpTask dT=252
  @24959 - running org.netbeans.core.ui.MenuWarmUpTask dT=3
  @27437 - running org.netbeans.modules.editor.EditorWarmUpTask dT=2478
[org.netbeans.core.WarmUpSupport] done
@28290 - Warmup finished, took 3669ms


Note that any activity rescheduled to another thread is not covered
here. Editor code takes 3.5-4s on empty userdir and 2.5s even if the
editor is open. We need to reduce this activity to some reasonable level.
Comment 3 Miloslav Metelka 2004-02-10 14:14:12 UTC
What is reasonable level?
Why did we establish the warmup then? Is there any plan to abandon it
completely?
Will each module have a specific amount of time dedicated?

 I would appreciate someone would clearly answer these questions
before doing any other actions.
Comment 4 Miloslav Metelka 2004-02-11 12:06:50 UTC
I've done additional warmup tuning - I've tried to eliminate some
tasks and change some tuning constants. The time necessary for view
hierarchy warmup should now be about a half: 4.1s -> 2.1s for first
start and 2.7s -> 1.2s for next starts on RH9. The first file opening
time has increased of roughly 20% (1.8s -> 2.2s) but it varies so it's
hard to provide a representative measurement.

As nobody has answered my warmup task related questions I consider
this issue as fixed.
Comment 5 _ rkubacki 2004-02-11 16:40:05 UTC
After discussion with Mila we made an agreement that it might be
usefull to reduce the amount of editor warmup work when there is some
opened (Java) editor.

Also there are no hard numbers what is acceptable use of warmup or
what is wrong. Long term goal is to avoid it or keep minimalized.
Comment 6 Miloslav Metelka 2004-02-13 15:45:38 UTC
The view hierarchy is now not drilled in case there is a file
pre-opened from previous IDE shutdown. It may be verified by using
-J-Dnetbeans.debug.editor.warmup=true - the "View hierarchy
initialized" will not be displayed once there is a file pre-opened.

I have also corrected an error in debugging that included some portion
of other initializations into the view hierarchy initialization.

Fixed in maintrunk:
Checking in src/org/netbeans/modules/editor/EditorWarmUpTask.java;
/cvs/editor/src/org/netbeans/modules/editor/EditorWarmUpTask.java,v 
<--  EditorWarmUpTask.java
new revision: 1.14; previous revision: 1.13
Comment 7 Antonin Nebuzelsky 2004-02-19 12:41:50 UTC
Radime, could you measure the two scenarios again (the same way on the
same configuration) and put the tracking messages here for comparison?
Thanks.
Comment 8 ehucka 2004-02-23 13:54:59 UTC
Build 200402221900
I don't see any change. Delay seems to be the same. 11 s of 100%CPU
after IDE main windows was showed. About 80% of startup time.

IMHO I rather prefer longer splash screen which inform me about
'Editor initialization' than started IDE which doesn't respond.
I think that a user is 'mystifying' by splash screen's progress bar.
It doesn't show how long a user must to wait for start of IDE.
There should be at least warmup progress bar but than I don't know why
to use warmups.
Comment 9 Miloslav Metelka 2004-02-23 14:27:29 UTC
I agree with Eman that a visual indication of warmup task (by e.g. a
progress bar) would be useful. Reassigning to performance team for
evaluation.
Comment 10 Antonin Nebuzelsky 2004-02-24 10:20:20 UTC
I absolutely agree. The user should get indication that something is
being done. A progress bar would be ideal.

Putting HIE folks on CC. Are we able to put a progress indication to
status bar??? Or is there any other way of progress indication which
would not be blocking UI?
Comment 11 dpavlica 2004-02-24 10:51:15 UTC
Yes, indication about warming up could be shown in Global status line
in the future. There is a plan about implementation of Progress bar
situated in Global status line. I talk with Dafe about its right look
and behavior. UI specification for it will be created during March.
Comment 12 Antonin Nebuzelsky 2004-02-24 10:52:21 UTC
OK and how about a solution for NB36?
Comment 13 Antonin Nebuzelsky 2004-02-25 13:22:14 UTC
It was discussed within performance team that there could be some text
written in the status line indicating warmup running. I will
investigate this.
Comment 14 _ rkubacki 2004-02-26 09:31:17 UTC
Should we close one of these issues as a dup - 40232 or this? They are
about the same topic.
Comment 15 ehucka 2004-02-26 12:16:05 UTC
I'd like to have this issue opened to it was fixed.

To the previous discussion: Is there defined any ratio between warmup
and startup times?
IMHO a GUI of any product shouldn't be shown to user until it is
responsive.
Comment 16 _ rkubacki 2004-03-08 08:57:16 UTC
No ratio is defined. The reasonable maximum is 3-5 secs and the goal
is to gid rid of as much tasks inculded here as possible.

Current state is very bad - although it looks acceptable on a fast
machines it gives very poor perception on a slower ones where the time
is often 10 secends or even more.
Comment 17 _ tboudreau 2004-03-10 09:59:18 UTC
Possibly see if -XX:PermSize=24M helps?  If warmup is causing classloading, probably 
there are a few full gc's happening to rearrange memory and make room.

Just checked it - running with and without PermSize set on my mac, without it there are 4 
full gcs after the UI is displayed; with it there is 1.
Comment 18 Antonin Nebuzelsky 2004-09-01 14:14:45 UTC
Irrelevant in 4.0. Warmup tasks are now hidden behind the classpath
scanning/check which has a progress dialog and the user has to wait
anyway.
Comment 19 ehucka 2004-09-01 15:01:41 UTC
I think your arguments are not correct. There are still a few seconds
of about 100% CPU consumption after IDE started. The scanning of
classpath starts after somebody open a project. But I now, there is
nothing to do if a project is not opened.
Comment 20 Marian Mirilovic 2005-07-15 07:53:01 UTC
closed