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 156652 - IDE takes five minutes to start up
Summary: IDE takes five minutes to start up
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Tomas Mysik
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-01-12 23:44 UTC by frankioski
Modified: 2009-05-13 14:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Attaching screen cap of splash. Notice the time at bottom right. (301.06 KB, image/png)
2009-01-12 23:45 UTC, frankioski
Details
Attaching screen cap of IDE finally opening up. Notice the time as lower right--over 5 minutes later! (222.17 KB, image/png)
2009-01-12 23:46 UTC, frankioski
Details
Attaching thread dump; it is now taking under 3 mins instead of 5 mins. Inconsistent. (47.95 KB, text/plain)
2009-01-15 00:45 UTC, frankioski
Details
Log file. Opening the IDE with 1 project of 24 MB and 1140 files took ~2 mins. (50.37 KB, text/plain)
2009-03-03 00:50 UTC, frankioski
Details
Attaching log file. Inconsistent behavior: It's only taking 2 minutes to finish starting up. Before it would take like 7 mins. I had file a similar bug for a previous version of NB for PC. I wish someone had told me about this switch! This is frustratin (437.12 KB, text/plain)
2009-03-05 22:25 UTC, frankioski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description frankioski 2009-01-12 23:44:28 UTC
Why does the IDE take five minutes to start up (splash screen to go away and open up the main frame)?
Comment 1 frankioski 2009-01-12 23:45:15 UTC
Created attachment 75725 [details]
Attaching screen cap of splash. Notice the time at bottom right.
Comment 2 frankioski 2009-01-12 23:46:09 UTC
Created attachment 75726 [details]
Attaching screen cap of IDE finally opening up. Notice the time as lower right--over 5 minutes later!
Comment 3 frankioski 2009-01-12 23:47:41 UTC
For the record, my machine:
Athlon 64 X2 Dual 5200+, 3 GB RAM, 120 GB HDD.
Comment 4 Peter Pis 2009-01-13 09:21:56 UTC
Thanks for the report. Anyway, could you please attach and take several thread dumps while running into this problem?

http://wiki.netbeans.org/GenerateThreadDump
Comment 5 frankioski 2009-01-15 00:45:29 UTC
Created attachment 75844 [details]
Attaching thread dump; it is now taking under 3 mins instead of 5 mins. Inconsistent.
Comment 6 Peter Pis 2009-01-23 08:07:49 UTC
Reassigning to java.
Comment 7 frankioski 2009-02-27 19:12:32 UTC
You guys can't be serious!
When I have one tiny project (197 files, 2.24 MB) open, NB starts up in a minute. But if I have a handful of medium size
projects (1100 files, 20 MB average) open, NB takes 10 minutes to start up.

When I worked on financial apps, a typical JEE app was > 500 MB. No wonder no one there used NB!
Comment 8 Oleg Khokhlov 2009-03-02 17:04:45 UTC
Could you please add -J-Dorg.netbeans.log.startup=print to netbeans_default_options in <nb_home>/etc/netbeans.conf file?
It will add timing in messages.log file.
And attach messages.log here.
Thanks.
Comment 9 frankioski 2009-03-03 00:50:43 UTC
Created attachment 77590 [details]
Log file. Opening the IDE with 1 project of 24 MB and 1140 files took ~2 mins.
Comment 10 Oleg Khokhlov 2009-03-03 16:36:14 UTC
nope, that didn't work

in netbeans.conf file you should see the line
netbeans_default_options="-J-client -J-Xverify:none -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m
-J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true"

please, add the flag at the end of this line:
netbeans_default_options="-J-client -J-Xverify:none -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m
-J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dorg.netbeans.log.startup=print"

and in messages.log you will see times like this:
  @6808 - Main window initialization finished, took 523ms
  @6808 - Main window initialized dT=0
  @6808 - Window system initialization dT=0
  @6856 - Security managers installed dT=48
  @6875 - Ran any delayed command-line options dT=19
  @6875 - Splash hidden dT=0
@6875 - Preparation finished, took 6871ms
@6878 - Main.main finished dT=3
@7967 - Window system loaded dT=1089

Comment 11 frankioski 2009-03-05 22:25:34 UTC
Created attachment 77786 [details]
Attaching log file. Inconsistent behavior: It's only taking 2 minutes to finish starting up. Before it would take like 7 mins. I had file a similar bug for a previous version of NB for PC. I wish someone had told me about this switch!  This is frustratin
Comment 12 frankioski 2009-03-05 22:26:55 UTC
By "switch", I meant the config flag.
Comment 13 Jaroslav Tulach 2009-03-16 16:50:02 UTC
I can understand this is frustrating. I am not sure whether you mentioned that first, but

Q: Does the IDE occupies your CPU or is it just silently sitting there?

From what I can see from your thread dump and the log. It takes 82s to go from "@4094 - Main.main finished dT=-80" 
to "@80239 - Window system loaded dT=76145". The thread dump shows that it is either subversion or web project fault. 
Try to play with your system a bit - close the web project to see if things improve, or remove all .svn directories to 
check if the fault is on side of SVN.

Anyway my guess is that the JspParserImpl is doing something nasty (it occupies AWT thread and those 76s of loading 
window system are likely to be spent in AWT thread). Tomáši, please look at what can be wrong or advice additional 
debugging techniques.
Comment 14 Tomas Mysik 2009-03-19 11:53:03 UTC
This issue is _very_ similar to issue #151339 and issue#156459 - unfortunately both issues were marked as INCOMPLETE and then,
after more than one month, they were closed as WORKSFORME. Thread dumps are very similar (Subversion as well as JSP Parser end
in "java.io.WinNTFileSystem.getBooleanAttributes(Native Method)"), we tried to reproduce with clean userdir, with reporter's userdir,
with reporter's project - no success. It would be great if you could provide more information:

1) Does the IDE occupies your CPU or is it just silently sitting there?

2) Try to play with your system a bit - close the web project to see if things improve, or remove all .svn directories to 
check if the fault is on side of SVN.

3) Could you please try to reproduce with a clean userdir? [1] In issue#151339, description 21, you wrote "I noticed that NB would not
freeze if I start with a fresh userdir." - could you please start your NB with clean userdir and then open the project(s) - is it slow? And if
you restart IDE with these opened projects - is it slow?

4) How many libraries (JAR files) does your project have? Is it possible to get your project or at least "nbproject" directory? If it's the
same project like in issue #151339, then (as I wrote already) please try to setup your project as a standard Web project (your Web
Freeform project setup is very likely not correct).

5) If you work with your project - is the IDE slow? Or is it slow only on startup?

Thanks a lot for your time and for helping us to find out where the problem could be.

[1] http://wiki.netbeans.org/FaqAlternateUserdir
Comment 15 Tomas Mysik 2009-03-19 12:50:46 UTC
One more idea, related to "java.io.WinNTFileSystem.getBooleanAttributes(Native Method)" - don't you have a big file on your desktop?
Or a broken shortcut on desktop?
One more question - your userdir as well as project files are on your local hard drive - right?
Comment 16 Jindrich Sedek 2009-04-15 11:18:59 UTC
frankioski, could you please answer the questions asked by tmysik, otherwise we can do nothing about your issue
Comment 17 Tomas Mysik 2009-05-13 14:39:58 UTC
No response from reporter for a long time, so closing as WORKSFORME.

Feel free to reopen this issue and provide information we asked for, please. Thanks.