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
new TreePath(new Object[0]));
	}
	/**
	 * Sets whether the node corresponding to the given element or tree path is
	 * expanded or collapsed.
	 * 
	 * @param elementOrTreePath
	 *            the element
	 * @param expanded
	 *            <code>true</code> if the node is expanded, and
	 *            <code>false</code> if collapsed
	 */
	public void setExpandedState(Object elementOrTreePath, boolean expanded) {
		Assert.isNotNull(elementOrTreePath);
		Widget item = internalExpand(elementOrTreePath, false);
		if (item instanceof Item) {
			if (expanded) {
				createChildren(item);
			}
			setExpanded((Item) item, expanded);
		}
	}
	/**
	 * Sets the selection to the given list of items.
	 * 
	 * @param items
	 *            list of items (element type:
	 *            <code>org.eclipse.swt.widgets.Item</code>)
	 */
	protected abstract void setSelection(List items);