Bug 65711 [Problems] Problems View takes too long to show
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/MarkerList.java
* @return the number of warning markers
	 */
	public int getWarnings() {
		return getMarkerCounts()[IMarker.SEVERITY_WARNING];
	}
	
	/**
	 * Returns an array of marker counts where getMarkerCounts()[severity] is the number
	 * of markers in the list with the given severity. 
	 * 
	 * @return an array of marker counts
	 */
	private int[] getMarkerCounts() {
		if (markerCounts == null) {
			markerCounts = new int[] {0,0,0};
			for (int idx = 0; idx < markers.length; idx++) {
				ConcreteMarker marker = markers[idx];
				
				if (marker instanceof ProblemMarker) {
					int severity = ((ProblemMarker)markers[idx]).getSeverity();
					if (severity >= 0 && severity <= 2) {
						markerCounts[severity]++;					
					}
				}
			}
		}
		return markerCounts;
	}
}