Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCEvent.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCEvent.java	(revision 389)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCEvent.java	(revision 390)
@@ -45,4 +45,8 @@
 	 */
 	private Map<String, String> parentParameters;
+	
+	private boolean targetChanged = false;
+	
+	private int targetHash = -1;
 
 	/**
@@ -145,4 +149,5 @@
 			target += "." + extension;
 		}
+		targetChanged = true;
 	}
 
@@ -187,19 +192,21 @@
 	@Override
 	protected int targetHashCode() {
-		int hashCode = 0;
-		int multiplier = 29;
-		if (target != null) {
-			String[] targetParts = target.split("\\]\\.\\[");
-			if (targetParts.length == 0) {
-				hashCode = widgetHashCode(target);
-			} else {
-				for (String widgetString : targetParts) {
-					hashCode = hashCode * multiplier
-							+ widgetHashCode(widgetString);
+		if( targetChanged || targetHash==-1 ) {
+			targetHash = 0;
+			int multiplier = 29;
+			if (target != null) {
+				String[] targetParts = target.split("\\]\\.\\[");
+				if (targetParts.length == 0) {
+					targetHash = widgetHashCode(target);
+				} else {
+					for (String widgetString : targetParts) {
+						targetHash = targetHash * multiplier
+								+ widgetHashCode(widgetString);
+					}
 				}
 			}
+			targetChanged = false;
 		}
-
-		return hashCode;
+		return targetHash;
 	}
 
@@ -221,5 +228,5 @@
 			hashCode = hashCode * multiplier + widgetInfo[1].hashCode();
 			hashCode = hashCode * multiplier + widgetInfo[2].hashCode();
-			hashCode = hashCode * multiplier + widgetInfo[3].hashCode();
+			//hashCode = hashCode * multiplier + widgetInfo[3].hashCode();
 		}
 		return hashCode;
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCTargetComparator.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCTargetComparator.java	(revision 389)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/jfc/data/JFCTargetComparator.java	(revision 390)
@@ -2,7 +2,12 @@
 
 import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
+
+import org.apache.commons.collections15.CollectionUtils;
 
 /**
@@ -18,4 +23,26 @@
  */
 public class JFCTargetComparator {
+	
+	private static boolean mutable = true;
+	
+	private static Set<String> knownTargets = new LinkedHashSet<String>();
+	
+	private static Map<String, Set<String>> equalTargets;
+	
+	public static void setMutable(boolean mutable) {
+		if( JFCTargetComparator.mutable==true && mutable == false ) {
+			equalTargets = new HashMap<String, Set<String>>();
+			for( String target1 : knownTargets ) {
+				Set<String> curEqualTargets = new HashSet<String>();
+				for( String target2 : knownTargets ) {
+					if( compare(target1, target2) ) {
+						curEqualTargets.add(target2);
+					}
+				}
+				equalTargets.put(target1, curEqualTargets);
+			}
+		}
+		JFCTargetComparator.mutable = mutable;
+	}
 
 	/**
@@ -41,11 +68,24 @@
 	 */
 	public static boolean compare(String target1, String target2) {
-		instance.addTarget(target1);
-		instance.addTarget(target2);
-
-		JFCWidget widget1 = instance.find(target1);
-		JFCWidget widget2 = instance.find(target2);
-
-		return widget1 == widget2;
+		boolean result = false;
+		if( mutable ) {
+			instance.addTarget(target1);
+			instance.addTarget(target2);
+			knownTargets.add(target1);
+			knownTargets.add(target2);
+			JFCWidget widget1 = instance.find(target1);
+			JFCWidget widget2 = instance.find(target2);
+			result = (widget1==widget2);
+		}
+		
+		
+		if( !mutable ) {
+			Set<String> curEquals = equalTargets.get(target1);
+			if( curEquals!=null ) {
+				result = curEquals.contains(target2);
+			}			
+		}
+		
+		return result;
 	}
 
@@ -287,4 +327,6 @@
 		 */
 		String text;
+		
+		int hashCode=0;
 
 		/**
@@ -309,11 +351,27 @@
 			if (obj instanceof JFCWidget) {
 				JFCWidget other = (JFCWidget) obj;
+				
+				
+				boolean titleEqual = CollectionUtils.containsAny(titles, other.titles);
+				boolean hashEqual = CollectionUtils.containsAny(hashCodes, other.hashCodes);
+				
+				/*
 				Set<String> titlesCopy = new LinkedHashSet<String>(titles);
 				Set<String> hashCodesCopy = new LinkedHashSet<String>(hashCodes);
 
 				titlesCopy.retainAll(other.titles);
-				hashCodesCopy.retainAll(other.hashCodes);
+				hashCodesCopy.retainAll(other.hashCodes);*/
 
 				boolean retVal;
+				
+				if (widgetClass.equals("Class")) {
+					retVal = (widgetClass.equals(other.widgetClass)
+							&& text.equals(other.text) && (titleEqual || hashEqual));
+				} else {
+					retVal = (widgetClass.equals(other.widgetClass)
+							&& index.equals(other.index)
+							&& text.equals(other.text) && (titleEqual || hashEqual));
+				}
+				/*
 				if (widgetClass.equals("Class")) {
 					retVal = (widgetClass.equals(other.widgetClass)
@@ -325,5 +383,5 @@
 							&& text.equals(other.text) && (!titlesCopy
 							.isEmpty() || !hashCodesCopy.isEmpty()));
-				}
+				}*/
 				return retVal;
 			}
@@ -338,11 +396,12 @@
 		@Override
 		public int hashCode() {
-			int multiplier = 7;
-			int hashCode = 0;
-			hashCode = multiplier * hashCode + widgetClass.hashCode();
-			if (!widgetClass.equals("Class")) {
-				hashCode = multiplier * hashCode + index.hashCode();
-			}
-			hashCode = multiplier * hashCode + text.hashCode();
+			if( hashCode==0 ) {
+				int multiplier = 7;
+				hashCode = multiplier * hashCode + widgetClass.hashCode();
+				if (!widgetClass.equals("Class")) {
+					hashCode = multiplier * hashCode + index.hashCode();
+				}
+				hashCode = multiplier * hashCode + text.hashCode();
+			}
 			return hashCode;
 		}
