Bug 236628 [Viewers] [JFace] Excessive Memory Usage by Project Explorer because of styles
Build ID: I20080516-1333 Steps To Reproduce: Project Explorer creates duplicate identical strings for every entry in it and wastes few Megabytes of memory depending on the scenario. In the update method of NavigatorDecoratingLabelProvider extending DelegatingStyledCellLabelProvider the call to cell.setStyleRanges(newStyleRanges) results in duplicate strings for the same column. The duplicate strings are created in ViewerRow.setStyleRanges public void setStyleRanges(int columnIndex, StyleRange[] styleRanges) { getItem().setData(KEY_TEXT_LAYOUT + columnIndex, styleRanges); } More information:
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/ViewerRow.java
result = prime * result
				+ ((getItem() == null) ? 0 : getItem().hashCode());
		return result;
	}
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ViewerRow other = (ViewerRow) obj;
		if (getItem() == null) {
			if (other.getItem() != null)
				return false;
		} else if (!getItem().equals(other.getItem()))
			return false;
		return true;
	}
	/**
	 * The cell at the current index (as shown in the UI). This can be different
	 * to the original index when columns are reordered.
	 * 
	 * @param visualIndex
	 *            the current index (as shown in the UI)
	 * @return the cell at the currently visible index
	 */
	ViewerCell getCellAtVisualIndex(int visualIndex) {
		return getCell(getCreationIndex(visualIndex));
	}