Bug 50100 [Performance] Huge performance issue with problem decorators
Using 0106 build, it takes minutes to update the markers for a compilation unit containing 250 problems (maximum limit). Each time I save the unit, the UI dies for several minutes. There is a running job in the background that I cannot identify. This is something new. I was not that bad with M5. I set it as critical, because it makes the editor unusable.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/ProblemsLabelDecorator.java
Iterator iter= model.getAnnotationIterator();
			while ((info != ERRORTICK_ERROR) && iter.hasNext()) {
				Annotation curr= (Annotation) iter.next();
				IMarker marker= isAnnotationInRange(model, curr, sourceElement);
				if (marker != null) {
					int priority= marker.getAttribute(IMarker.SEVERITY, -1);
					if (priority == IMarker.SEVERITY_WARNING) {
						info= ERRORTICK_WARNING;
					} else if (priority == IMarker.SEVERITY_ERROR) {
						info= ERRORTICK_ERROR;
					}
				}
			}
		}
		return info;
	}
			
	private IMarker isAnnotationInRange(IAnnotationModel model, Annotation annot, ISourceReference sourceElement) throws CoreException {
		if (annot instanceof MarkerAnnotation) {
			IMarker marker= ((MarkerAnnotation) annot).getMarker();
			if (marker.exists() && marker.isSubtypeOf(IMarker.PROBLEM)) {
				Position pos= model.getPosition(annot);
				if (pos != null && (sourceElement == null || isInside(pos.getOffset(), sourceElement))) {
					return marker;
				}
			}
		}
		return null;
	}