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.
If new sources/libraries have been parsed during the IDE run, IDE shutdown can take very long (tens of seconds or even a minute). AWT thread is blocked during that time in MdrStorage.shutDown() method, calling btreestorage.LogFile.flushFile() for all the B-trees. This confuses the user, who does not expect the shutdown to take so long, and what is even worse is that the user may kill the IDE during this process which would corrupt the MDR storage and full scan would be started next time (I guess). In short, progress bar with progress indication (and the flushing process running on background) is needed. The progress dialog could say for example "Writing project classpath information to persistent storage." with the dialog title "IDE shutdown".
Dusane, any comments?
I agree in that case when it can take more then 6-10 seconds. Then there should exist Progress indication...suggested labels looks quite good and Propgress in dialog should look similar to Progress in Scanning dialog in the spec.
Honzo, please add the progress bar. Thanks.
I'm afraid we are unable to fix this issue without openide help. As you mentioned before, mdr stuff is saved on IDE shutdown. IDE shutdown is done in AWT thread. It looks like the only way, how to prevent the IDE from doing System.exit() is to block whole process in ModuleInstall.close(). Any ideas how to implement shut down progress? Please help as soon as possible. It is P2. Thanks.
"Textual" version of progressbar commited to trunk: Checking in ClassIndex.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/ClassIndex.java,v <-- ClassIndex.java new revision: 1.15; previous revision: 1.14 done Checking in Bundle.properties; /cvs/java/javacore/src/org/netbeans/modules/javacore/Bundle.properties,v <-- Bundle.properties new revision: 1.10; previous revision: 1.9 done
OK, I have it! I'll commit it as soon as commit validation pass. Thanks to Jarda for his help.
Implemented. Tondo, please verify. Checking in ShutDownProgressPanel.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/ShutDownProgressPanel.java,v <-- ShutDownProgressPanel.java initial revision: 1.1 done RCS file: /cvs/java/javacore/src/org/netbeans/modules/javacore/ShutDownProgressPanel.form,v done Checking in ShutDownProgressPanel.form; /cvs/java/javacore/src/org/netbeans/modules/javacore/ShutDownProgressPanel.form,v <-- ShutDownProgressPanel.form initial revision: 1.1 done RCS file: /cvs/java/javacore/src/org/netbeans/modules/javacore/ShutDownProgressListener.java,v done Checking in ShutDownProgressListener.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/ShutDownProgressListener.java,v <-- ShutDownProgressListener.java initial revision: 1.1 done Checking in JavaCoreModule.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/JavaCoreModule.java,v <-- JavaCoreModule.java new revision: 1.7; previous revision: 1.6 done Checking in ClassIndex.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/ClassIndex.java,v <-- ClassIndex.java new revision: 1.16; previous revision: 1.15 done
The progress dialog is displayed at the shutdown, but too late and for too short amount of time. After invoking the shutdown, main window is gray and in console thread dump I can see that MdrStorage.shutDown() is being executed but the progress dialog is not yet displayed. Then the main window disappears and the progress dialog appears for a short moment. This must be changed to cover the whole MDR shutdown with the progress.
Ha - in that case it is performance problem in MDR. Progress Bar shows progress of saving ClassIndexes - it can last long. Rest of MDR stuff should be saved fast. If it is not true, it must be fixed. Dan will take a look at it.
Created attachment 17469 [details] Stack trace of AWT where you can see the calls in MDR which are currently NOT covered by the progress and should be covered
Please provide more information how to reproduce it. I cannot see it on Mac OS X nor Linux.
This issue is Windows specific. We should not add any progress bar, but rather find out, why the shutdown takes so long on Windows. Tondo, can you help us with that?
FileDescriptor.sync() method is roughly 10 times slower on Windows than on Linux.
Created attachment 17516 [details] Simple project for measuring sync() routine
> We should not add any progress bar, but rather find out, why > the shutdown takes so long on Windows. Let me disagree. I saw the shutdown take very long time, spent in the methods mentioned in this issue, also on my Linux notebook. So, yes, make it faster on Windows. But still, cover the shutdown with the progress bar.
Bear in mind that there is a difference between first shutdown (ide is running with fresh new userdir) and other ones.
Prograss bar moved from javacore to mdr module. Checking in org/netbeans/modules/mdr/MdrModule.java; /cvs/mdr/module/src/org/netbeans/modules/mdr/MdrModule.java,v <-- MdrModule.java new revision: 1.2; previous revision: 1.1
Verified in trunk. Marking as a candidate for merge to release40_beta2 branch.
Verified in Beta 2 build 200409160517.