Bug 95672 Focus changes slow when java browsing perspective open
To reproduce: 1. Run Eclipse in your favorite profiler 2. Open the Java browsing perspective 3. Profile the time taken to switch between java editors On my system, approx. 50% of the time is spent in JavaBrowsingPart.partBroughtToTop. Notice that this method continues to dominate activation changes, even when another perspective is active and no java browsing parts are visible.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/browsing/JavaBrowsingPart.java
while (iter.hasNext()) {
			Object element= iter.next();
			if (!(element instanceof IJavaElement))
				return null;
			if (!currentInput.equals(findInputForJavaElement((IJavaElement)element)))
				return null;
		}
		return firstElement;
	}
	/**
	 * Gets the typeComparator.
	 * @return Returns a JavaElementTypeComparator
	 */
	protected Comparator getTypeComparator() {
		return fTypeComparator;
	}
	/**
	 * Links to editor (if option enabled)
	 */
	private void linkToEditor(IStructuredSelection selection) {
		Object obj= selection.getFirstElement();
		if (selection.size() == 1) {
			IEditorPart part= EditorUtility.isOpenInEditor(obj);
			if (part != null) {
				IWorkbenchPage page= getSite().getPage();
				page.bringToTop(part);
				if (obj instanceof IJavaElement)
					EditorUtility.revealInEditor(part, (IJavaElement) obj);
			}
		}