Bug 205702 - First step of uninstaller takes 90s
First step of uninstaller takes 90s
Status: VERIFIED FIXED
Product: installer
Classification: Unclassified
Component: Code
7.1
PC Windows 7
: P1 (vote)
: 7.1
Assigned To: Tomas Hurka
issues@installer
: 71_HR_FIX, PERFORMANCE, REGRESSION
Depends on:
Blocks: 206140
  Show dependency treegraph
 
Reported: 2011-11-30 10:11 UTC by Petr Cyhelsky
Modified: 2012-01-18 16:32 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
snapshot showing the initial phase of uninstaller (6.48 KB, application/octet-stream)
2011-11-30 10:11 UTC, Petr Cyhelsky
Details
Trying to run uninstaller after it was killed (20.38 KB, image/jpeg)
2011-12-07 09:54 UTC, asenk
Details
.nbi lock (82.07 KB, image/png)
2011-12-07 09:56 UTC, asenk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2011-11-30 10:11:37 UTC
Created attachment 113653 [details]
snapshot showing the initial phase of uninstaller

The first step of uninstaller (before user can choose what exactly he wants to uninstall) takes 90s (or more with big userdir). See the attached snapshot - especially :
org.netbeans.installer.wizard.components.panels.netbeans.NbPreInstallSummaryPanel$NbPreInstallSummaryPanelSwingUi.areThereNewFiles()
which took bulk of the time

these slowdowns were probably caused by 
http://hg.netbeans.org/profiler-main/rev/74947221f42f2ab8584afc954c50dba03ec61526
Comment 1 Tomas Hurka 2011-11-30 12:38:06 UTC
To fix the problem with AbstactCollection.containsAll()
List<File> installedFiles instance field in NbPreInstallSummaryPanel.areThereNewFiles() should be Set, not List. Currently it is LinkedList, which is the the worst case.

--- a/installer/engine/src/org/netbeans/installer/wizard/components/panels/netbeans/NbPreInstallSummaryPanel.java	Tue Nov 29 21:16:42 2011 +0100
+++ b/installer/engine/src/org/netbeans/installer/wizard/components/panels/netbeans/NbPreInstallSummaryPanel.java	Wed Nov 30 13:36:02 2011 +0100
@@ -210,7 +212,7 @@
 
     private boolean areThereNewFiles(final File installLocation) throws IOException {
         LogManager.log("areThereNewFiles:  location "  + installLocation);
-        List<File> installedFiles = new LinkedList<File>();
+        Set<File> installedFiles = new HashSet<File>();
         FilesList existentFilesList = FileUtils.listFiles(installLocation);
 
         for (Product product : Registry.getInstance().getProductsToUninstall()) {
Comment 2 Marian Mirilovic 2011-12-07 09:31:04 UTC
This is serious problem our users are facing now ... Jirka, could you please do quick evaluation ? Thanks a lot.
Comment 3 Jiri Rechtacek 2011-12-07 09:42:28 UTC
(In reply to comment #2)
> This is serious problem our users are facing now
How serious? Are you consider as 7.1 showstopper?
> ... Jirka, could you please do
> quick evaluation ? Thanks a lot.
The evaluation did Tomas&Petr above, I see no problem to fix it for patch1.
Comment 4 asenk 2011-12-07 09:51:18 UTC
During this
process the progress bar is not moving, and uninstaller window doesn't
response.
See:
http://netbeans.org/bugzilla/show_bug.cgi?id=202535 

So user can get confused and kill the uninstaller in windows
task manager. After that is impossible to uninstall NB7.1 because the
uninstaller doesn't start anymore and is falling again and again.
(But NB are running without problems).

If you try install NB again, there is a lock file in .nbi\.nbilock
Comment 5 asenk 2011-12-07 09:54:49 UTC
Created attachment 113907 [details]
Trying to run uninstaller after it was killed

If you run uninstaller, after its killing, you can see only this window. After that uninstaller falls down.
Comment 6 asenk 2011-12-07 09:56:06 UTC
Created attachment 113908 [details]
.nbi lock

This shows, when you try to install NB71 again (after uninstaller fall).
Comment 7 Tomas Hurka 2011-12-07 10:34:26 UTC
Fixed in main. The first step of uninstaller should run much faster.

changeset:   208443:4d84e95e7732
user:        Tomas Hurka <thurka@netbeans.org>
date:        Wed Dec 07 11:31:30 2011 +0100
summary:     bugfix #205702, computation of areThereNewFiles() improved. Do not use List especially LinkedList and do not use FileUtils.listFiles() since it is slow because it computes MD5 of all files
Comment 8 Petr Cyhelsky 2011-12-07 10:42:49 UTC
verified
Comment 9 Tomas Danek 2011-12-07 11:18:11 UTC
installed 7.1 fcs candidate on my W7 vbox:
- 1st panel during uninstallation took me  ~3minutes (slower I/O caused by vbox?!)
- installed IDE again
- during second installation killed installer during waiting on 1st panel
- after that got system dialog that program was not uninstalled correctly with option to run uninstaller
- chose to run uninstaller, uninstaller was started, got message that nbi lock exist, after confirming that i really want to uninstall by "yes" I was able to uninstall successfully.

to conclude: user will probably have to deal only with slowness, to me did not happen scenario of not being able to start uninstaller again after killing it.
Comment 10 Tomas Hurka 2011-12-07 15:01:15 UTC
Transplanted to release71

http://hg.netbeans.org/releases/rev/1731eea62f05

changeset:   215041:1731eea62f05
branch:      release71
parent:      214914:12946391a8a5
user:        Tomas Hurka <thurka@netbeans.org>
date:        Wed Dec 07 11:31:30 2011 +0100
summary:     bugfix #205702, computation of areThereNewFiles() improved. Do not use List especially LinkedList and do not use FileUtils.listFiles() since it is slow because it computes MD5 of all files
Comment 11 Jiri Rechtacek 2011-12-07 20:38:59 UTC
(In reply to comment #7)
> Fixed in main. The first step of uninstaller should run much faster.
> 
> changeset:   208443:4d84e95e7732
> user:        Tomas Hurka <thurka@netbeans.org>
> date:        Wed Dec 07 11:31:30 2011 +0100
> summary:     bugfix #205702, computation of areThereNewFiles() improved. Do not
> use List especially LinkedList and do not use FileUtils.listFiles() since it is
> slow because it computes MD5 of all files

Tomas, thanks. Yous fix works correctly. Only once problem I see if some of directories being checked is a symlink to other tree of files. Then it can be freezing uninstaller as well, but it will be fixed together with issue 202535 soon. I agree with integration into 7.1 branch, it fixes most of possible problems. Thanks
Comment 12 Quality Engineering 2011-12-08 03:47:27 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/1731eea62f05
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #205702, computation of areThereNewFiles() improved. Do not use List especially LinkedList and do not use FileUtils.listFiles() since it is slow because it computes MD5 of all files
(transplanted from 4d84e95e7732aac5a8016336d1ad0e0e3bbf28f0)
Comment 13 Quality Engineering 2011-12-08 12:12:43 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/4d84e95e7732
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #205702, computation of areThereNewFiles() improved. Do not use List especially LinkedList and do not use FileUtils.listFiles() since it is slow because it computes MD5 of all files


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo