Bug 161086 [Viewers] performance problem in AbstractTreeViewer.internalExpandToLevel
If you expand to ALL_LEVELS, internalExpandToLevel will call createChildren even if the element has no children, i.e. it does not check if the element is expandable. Found this while experimenting with the Quick Access feature (enter "con", then delete all three characters one at a time).
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/AbstractTreeViewer.java
}
				Object[] result = tpcp.getChildren(path);
				if (result != null) {
					return result;
				}
			} else if (cp instanceof ITreeContentProvider) {
				ITreeContentProvider tcp = (ITreeContentProvider) cp;
				Object[] result = tcp.getChildren(parent);
				if (result != null) {
					return result;
				}
			}
		}
		return new Object[0];
	}
	/**
	 * Returns all selected items for the given SWT control.
	 * 
	 * @param control
	 *            the control
	 * @return the list of selected items
	 */
	protected abstract Item[] getSelection(Control control);
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.jface.viewers.StructuredViewer#getSelectionFromWidget()
	 */
	protected List getSelectionFromWidget() {
		Widget[] items = getSelection(getControl());