My RCP application start up changed from 3.2 to 3.3 [message #324207] |
Sat, 19 January 2008 19:29  |
Eclipse User |
|
|
|
I have an RCP application which takes about 60 seconds to start up. A
portion of that is database initialization that does not need to be done
before the GUI comes up. Using 3.2 I had my startup time (for the GUI to
appear) down to 45s with the additional work happening on a separate
thread and completing 20s or so after that.
I have updated my application to use 3.3 (I wanted some of the SWT
enhancements) and now I see that the GUI does not appear until after my
initialization thread is finished. I did change from IPlatformRunnable to
IApplication for my app but that did not help.
The second thread is launched from the start method of one of my
application's plug-ins with code like this:
new Thread (new Runnable () {
public void run () {
try {
// Delay the start so the rest of the application can
get a head start
Thread.sleep (200);
} catch (InterruptedException e) {
try {
... do a bunch of work here...
} catch (CoreException e) {
DataAccessPlugin.getInstance ().getLog ().log
(ErrorFactory.createStatusObject (
DataAccessPlugin.getID (), e,
DataAccessErrorCodes.WARNING_PRELOADING_FAILED));
} finally {
if (connection != null) {
try {
connection.close ();
} catch (SQLException e) {
DataAccessPlugin.getInstance ().getLog ().log
(ErrorFactory.createStatusObject (
DataAccessPlugin.getID (), e,
DataAccessErrorCodes.WARNING_PRELOADING_FAILED));
}
}
}
}
}).start ();
What has changed? What can I do to start a thread that will not prevent
the GUI from coming up?
Any thoughts or advice would be appreciated.
Ian
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04315 seconds