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 36675 - Slow startup + stack trace on next start after killing previous instance of IDE
Summary: Slow startup + stack trace on next start after killing previous instance of IDE
Status: VERIFIED DUPLICATE of bug 37005
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2003-10-19 00:43 UTC by _ tboudreau
Modified: 2008-12-22 21:47 UTC (History)
4 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 _ tboudreau 2003-10-19 00:43:00 UTC
After killing my previous copy of the IDE, I 
started NetBeans again.

There was a long enough delay that I thought 
something had gone wrong, and brought up the 
task manager to kill the process.

Then the stacktrace below appeared on the 
console (not for release builds, I presume), and
the splash screen came up and the IDE started.


If we're going to take this approach to avoid 
two instances running with the same userdir, 
there needs to be some UI - splash screen or 
something, or the timeout period needs to be 
shorter, or both.

Question:  Would it be possible/possibly harmful 
to do this socket check asynchronously, and have 
it simply kill the JVM one way or another if the 
exception isn't thrown?  If we don't do any file 
*writing* on second and later startups on the 
same user directory, that would probably do the 
trick.  I suppose you don't know what modules 
will want to do on startup, but if you could 
guarantee that everything before that point 
would not cause any userdir writes, at least 
that part of startup could be done 
asynchronously.

The one tricky thing would probably be ide.log; 
it may not be worth it, but the current delay 
with no UI just looks like something's broken.

------

java.net.ConnectException: Connection timed out: 
connect
        at java.net.PlainSocketImpl.socketConnect
(Native Method)
        at java.net.PlainSocketImpl.doConnect
(PlainSocketImpl.java:305)
        at 
java.net.PlainSocketImpl.connectToAddress
(PlainSocketImpl.java:171)
        at java.net.PlainSocketImpl.connect
(PlainSocketImpl.java:158)
        at java.net.Socket.connect
(Socket.java:452)
        at java.net.Socket.connect
(Socket.java:402)
        at java.net.Socket.<init>
(Socket.java:309)
        at java.net.Socket.<init>
(Socket.java:153)
        at org.netbeans.CLIHandler.initialize
(CLIHandler.java:366)
        at org.netbeans.CLIHandler.initialize
(CLIHandler.java:239)
        at org.netbeans.Main.main(Main.java:100)
Comment 1 Marian Mirilovic 2003-11-10 09:44:05 UTC
Yarda, look at it, please.
Thanks in advance.
Comment 2 Jaroslav Tulach 2003-11-10 10:46:05 UTC
I think this is not big priority, or do we optimize for killing
previous version of ide (btw. if I kill mozilla, and the lock file
stays there, I have to remove the lock file by hand), but there
another issue 37005 which needs to be fixed. 

I wanted to show a dialog as early as possible saying that there is a
lock file and whether to "Quit/Overwrite". Ok?
Comment 3 Jaroslav Tulach 2003-11-27 13:52:21 UTC
Right now a question dialog is shown if the lock file remains in the
directory. That does not improve the speed, but at least gives user a
glue of what is going on. 



*** This issue has been marked as a duplicate of 37005 ***
Comment 4 Marian Mirilovic 2004-03-16 09:03:55 UTC
verified duplicate,
by the way it's already fixed in incoming NB3.6