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
protected void setInitialInput() {
		
		ISelection selection= getSite().getPage().getSelection();
		Object input= getSingleElementFromSelection(selection);
		if (!(input instanceof IJavaElement)) {
			
			input= getSite().getPage().getInput();
			if (!(input instanceof IJavaElement) && input instanceof IAdaptable)
				input= ((IAdaptable)input).getAdapter(IJavaElement.class);
		}
		setInput(findInputForJavaElement((IJavaElement)input));
	}
	protected void setInitialSelection() {
		
		Object input;
		IWorkbenchPage page= getSite().getPage();
		ISelection selection= null;
		if (page != null)
			selection= page.getSelection();
		if (selection instanceof ITextSelection) {
			Object part= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
			if (part instanceof IEditorPart) {
				setSelectionFromEditor((IEditorPart)part);
				if (fViewer.getSelection() != null)
					return;
			}
		}
		
		if (selection == null || selection.isEmpty())
			selection= restoreSelectionState(fMemento);