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
setInput(null);
			setSelection(StructuredSelection.EMPTY, true);
			return;
		}
		IJavaElement je= (IJavaElement)o;
		IJavaElement elementToSelect= getSuitableJavaElement(findElementToSelect(je));
		IJavaElement newInput= findInputForJavaElement(je);
		IJavaElement oldInput= null;
		if (getInput() instanceof IJavaElement)
			oldInput= (IJavaElement)getInput();
		if (elementToSelect == null && !isValidInput(newInput) && (newInput == null && !isAncestorOf(je, oldInput)))
			
			setInput(null);
		else if (mustSetNewInput(elementToSelect, oldInput, newInput)) {
			
			setInput(newInput);
			
			elementToSelect= getSuitableJavaElement(elementToSelect);
		}
		if (elementToSelect != null && elementToSelect.exists())
			setSelection(new StructuredSelection(elementToSelect), true);
		else
			setSelection(StructuredSelection.EMPTY, true);
	}
	/**
	 * Compute if a new input must be set.
	 *
	 * @return	<code>true</code> if the input has to be set
	 * @since 3.0
	 */