Bug 58817 UI no longer responsive when sorting search matches
Build 20040413 I searched for references to type: java.lang.System in org.eclipse.jdt.core project. This found over 4000 matches. I attempted to sort them by parent name, and my IDE locked for about 5 minutes to do the work, with no progress indication, no refresh and 100% CPU usage. Clearly something to improve on UI responsiveness front.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchResultPage.java
super.fillContextMenu(mgr);
		addSortActions(mgr);
		fActionGroup.setContext(new ActionContext(getSite().getSelectionProvider().getSelection()));
		fActionGroup.fillContextMenu(mgr);
		
	}
	
	private void addFilterActions(IMenuManager viewMenu) {
		String filteringGroup= "Filtering"; 
		viewMenu.add(new Separator(filteringGroup));
		MenuManager mgr= new MenuManager(SearchMessages.getString("JavaSearchResultPage.filter.submenu")); 
		for (int i= 0; i < fFilterActions.length; i++) {
			mgr.add(fFilterActions[i]);
		}
		
		viewMenu.appendToGroup(filteringGroup, mgr);
	}
	private void addSortActions(IMenuManager mgr) {
		if (getLayout() != FLAG_LAYOUT_FLAT)
			return;
		MenuManager sortMenu= new MenuManager(SearchMessages.getString("JavaSearchResultPage.sortBylabel")); 
		sortMenu.add(fSortByNameAction);
		sortMenu.add(fSortByPathAction);
		sortMenu.add(fSortByParentName);
		
		fSortByNameAction.setChecked(fCurrentSortOrder == fSortByNameAction.getSortOrder());
		fSortByPathAction.setChecked(fCurrentSortOrder == fSortByPathAction.getSortOrder());
		fSortByParentName.setChecked(fCurrentSortOrder == fSortByParentName.getSortOrder());
		
		mgr.appendToGroup(IContextMenuConstants.GROUP_VIEWER_SETUP, sortMenu);