Bug 84912 [KeyBindings] performance: Lots of garbage when editor gains/loses focus
build i0208 Not sure where to enter this report. Adding Tod and John to CC as they will be involve in performance work this release. I have the Platform/UI heap usage plug-in installed. I notice that when I switch focus from the editor to a view (e.g. Outline), the heap usage increases by a meg or 2. Putting focus back to the editor does the same. This happens with both the text editor and more prominatly with the Java editor. It doesn't matter if the view is docked or is a fast view.
bundles/org.eclipse.jface/src/org/eclipse/jface/bindings/BindingManager.java
}
	}
	/**
	 * <p>
	 * Creates a tree of context identifiers, representing the hierarchical
	 * structure of the given contexts. The tree is structured as a mapping from
	 * child to parent.
	 * </p>
	 * <p>
	 * This method completes in <code>O(n)</code>, where <code>n</code> is
	 * the height of the context tree.
	 * </p>
	 * 
	 * @param contextIds
	 *            The set of context identifiers to be converted into a tree;
	 *            must not be <code>null</code>.
	 * @return The tree of contexts to use; may be empty, but never
	 *         <code>null</code>. The keys and values are both strings.
	 */
	private final Map createContextTreeFor(final Set contextIds) {
		final Map contextTree = new HashMap();
		final Iterator contextIdItr = contextIds.iterator();
		while (contextIdItr.hasNext()) {
			String childContextId = (String) contextIdItr.next();
			while (childContextId != null) {
				final Context childContext = contextManager
						.getContext(childContextId);
				try {
					final String parentContextId = childContext.getParentId();
					contextTree.put(childContextId, parentContextId);