Project: Eclipse_Platform_UI
Bug 139700 Long delay on package explorer selection changes in large workspace
Reported: 2006-05-02 10:49:54 | Status: verified fixed

Build: Eclipse 3.2 RC2 I created a workspace with every callisto project added (600 projects). Clicking around in the Navigator, I found a long delay responding to selection changes (2-3 seconds on a dual 3 Ghz machine with 1024 MB RAM). The culprit is CloseUnrelatedProjectsAction.getSelectedResources. The algorithm it uses for computing the set of "unrelated projects" is O(N^3) on the number of projects in the worst case (the worst case being where all N projects are tightly related to each other, as in the Callisto project case). This should be fixed for 3.2, either by improving the algorithm, or not updating the set of unrelated projects when the selection changes. It currently does this in order to update the enablement of the action (disabling the action when there are no open unrelated projects).

Files changed in fix:
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/actions/CloseUnrelatedProjectsAction.java bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/misc/DisjointSet.java