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
protected void internalCollapseToLevel(Widget widget, int level) {
		if (level == ALL_LEVELS || level > 0) {
			if (widget instanceof Item) {
				setExpanded((Item) widget, false);
			}
			if (level == ALL_LEVELS || level > 1) {
				Item[] children = getChildren(widget);
				if (children != null) {
					int nextLevel = (level == ALL_LEVELS ? ALL_LEVELS
							: level - 1);
					for (int i = 0; i < children.length; i++) {
						internalCollapseToLevel(children[i], nextLevel);
					}
				}
			}
		}
	}
	/**
	 * Recursively collects all expanded items from the given widget.
	 * 
	 * @param result
	 *            a list (element type: <code>Item</code>) into which to
	 *            collect the elements
	 * @param widget
	 *            the widget
	 */
	private void internalCollectExpandedItems(List result, Widget widget) {
		Item[] items = getChildren(widget);
		for (int i = 0; i < items.length; i++) {
			Item item = items[i];