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
return contentService;
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.jface.viewers.AbstractTreeViewer#add(java.lang.Object,
	 *      java.lang.Object[])
	 */
	public void add(Object parentElement, Object[] childElements) {
		
		NavigatorPipelineService pipeDream = (NavigatorPipelineService) contentService
				.getPipelineService();
		PipelinedShapeModification modification = new PipelinedShapeModification(
				parentElement, new ContributorTrackingSet(contentService,
						childElements));
		pipeDream.interceptAdd(modification);
		Object parent = (parentElement == getInput()) ? getInput()
				: modification.getParent();
		super.add(parent, modification.getChildren().toArray());
	}
	/**
	 * <p>
	 * Removals are handled by refreshing the parents of each of the given
	 * elements. The parents are determined via calls ot the contentProvider.
	 * </p>
	 * 
	 * @see org.eclipse.jface.viewers.AbstractTreeViewer#remove(java.lang.Object[])
	 */
	public void remove(Object[] elements) {