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 116720 - Startup is *very* resource hungry
Summary: Startup is *very* resource hungry
Status: RESOLVED DUPLICATE of bug 114155
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-09-25 16:44 UTC by santafen
Modified: 2007-10-10 14:49 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
startup log file (64.58 KB, text/plain)
2007-09-27 15:20 UTC, santafen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description santafen 2007-09-25 16:44:51 UTC
Startup of NB6.0B1 can take over 3 minutes, using over 75% of a dual-core MacBook Pro (Intel Core Duo). This is a *LOT* of processing power to just start up 
the IDE, and it brings the rest of the machine to a virtual standstill while it starts up. Unacceptable performance.
Comment 1 Petr Nejedly 2007-09-25 18:21:01 UTC
How many projects do you have opened? What kind of projects? How large are they?
Do you see the same problem if you exit the IDE and immediatelly start it again?
Comment 2 santafen 2007-09-25 18:52:54 UTC
I have a dozen or so projects open, some with as few as one source file, some with as many as 100 or so. Startup time is almost *always* in the multiple 
minutes, and CPU usage is *always* near 100% of 2 cores. Exiting the IDE and restarting only clears up the memory-hog issue, not the startup time issue.
Comment 3 Petr Nejedly 2007-09-27 15:00:36 UTC
Well, the IDE should better use 100% of the available CPUs during the startup, no?
It is interesting that the warm start is as slow too.
Could you please generate startup profile by starting the IDE with 
-J-Dorg.netbeans.log.startup=print
and posting the log ($userdir/.netbeans/dev/var/messages.log) here?
I'll look into what makes the worst part of the startup.
You can also try to generate few thread dumps during the startup and post them here as well:
http://wiki.netbeans.org/wiki/view/GenerateThreadDump
Comment 4 santafen 2007-09-27 15:06:32 UTC
No, it should NOT use 100% of the CPU. I should be able to start up NetBeans and still do other work on the machine while it is starting up. If it is using 100% 
of 2 CPUs, then I can do very little else. Kind of a pig in that regard. 

The IDE should be able to start up and use significantly less than 50% of ONE CPU, as I have NO other apps that use even close to 100% of 2 CPUs to start up.

I'll try to post the startup log soon.
Comment 5 santafen 2007-09-27 15:20:45 UTC
Created attachment 49686 [details]
startup log file
Comment 6 Petr Nejedly 2007-09-27 16:56:02 UTC
The startup log didn't make it into the IDE log for same reason. Didn't it end up in the console?
It should look like:
  @99 - TopLogging initialized dT=97
  @99 - Command line parsed dT=0
  @99 - XML Factories started
  @165 - XML Factories finished, took 66ms
  @169 - License check performed and upgrade wizard consulted dT=4
  @449 - Modules initialization started
    @562 - ModuleSystem created dT=113
...
Comment 7 santafen 2007-09-27 17:05:05 UTC
for the love of pete ... I added the startup parameter to the startup script -- no easy feat on Mac OS X -- and restarted. I have no idea where the output went. 
If it doesn't go to the log file, that seems like another bug to me. I don't start NetBeans from the command-line. 

I'd love to be able to spend my day debugging Netbeans, but I actually need to work with it. Guess I'll go back to 5.5. :-(
Comment 8 Petr Nejedly 2007-10-10 12:21:29 UTC
Do you have any NetBeans module projects open? NetBeans sources?

Comment 9 santafen 2007-10-10 14:03:44 UTC
I have a couple of NetBeans Modules projects in the projects viewer, but no sources open for them. 
Comment 10 Petr Nejedly 2007-10-10 14:38:17 UTC
Thanks, that explains a lot.
The projectsui module instantiates all the opened projects during the startup, and instantiating NBM projects involves
scan of the netbeans platform and colocated modules ("nb.org universe"), which is very I/O intensive process (this also
explains why other applications have problems during the IDE startup - disk subsystem is very busy seeking).
Comment 11 Jesse Glick 2007-10-10 14:42:06 UTC
Support for module projects inside nb.org is slow. No immediate plans to fix, would require a rewrite of some internals.

*** This issue has been marked as a duplicate of 114155 ***
Comment 12 santafen 2007-10-10 14:49:43 UTC
slow is an understatement. Anything that can tank a 2-processor machine with 3GB of RAM is not just slow. It is seriously broken. 

I have read the other bug that this is supposedly a duplicate of. No help there either. Looks like the plan is to leave it broken.