Bug 144294 Performance: CommonNavigator could easily cache its ISelection to improve its performance
Currently, the CommonNavigator does not override the getSelection() method, which is quite expensive when called repeatedly by clients since it gets the current selection from the underlying SWT widget each time it gets called. A simple trick is to cache the selection and update it only when it actually changes. This would result in improved performance for clients who call getSelection() often. This defect is related to 140032. Please refer to it for more info. I will be submitting a patch shortly.
bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/navigator/CommonViewer.java
try {
			super.createTreeItem(parent, element, index);
		} catch (Exception ex) {
			ex.printStackTrace();
		} catch (Error e) {
			e.printStackTrace();
		}
	}
	/*
	 * @see ContentViewer#handleLabelProviderChanged(LabelProviderChangedEvent)
	 */
	protected void handleLabelProviderChanged(LabelProviderChangedEvent event) {
		Object[] changed = event.getElements();
		if (changed != null) {
			ArrayList others = new ArrayList();
			for (int i = 0; i < changed.length; i++) {
				Object curr = changed[i];
				others.add(curr);
			}
			if (others.isEmpty()) {
				return;
			}
			event = new LabelProviderChangedEvent((IBaseLabelProvider) event
					.getSource(), others.toArray());
		}
		super.handleLabelProviderChanged(event);
	}
	protected void handleDispose(DisposeEvent event) {
		dispose();
		super.handleDispose(event);