]> source.dussan.org Git - vaadin-framework.git/commitdiff
Improving performance of ConnectorTracker (#12218)
authorFabian Lange <lange.fabian@gmail.com>
Sat, 13 Jul 2013 20:12:28 +0000 (22:12 +0200)
committerVaadin Code Review <review@vaadin.com>
Mon, 15 Jul 2013 05:31:46 +0000 (05:31 +0000)
Swapping the if check in cleanConnectorMap to prevent unnecessary calls to
isComponentVisible when the connector is in uninitializedConnectors set.

Change-Id: If6305a908364f8a7bb51fd7302449c6f54c274a3

server/src/com/vaadin/ui/ConnectorTracker.java

index 85cdcdf65c8683b265f02a003d0818968402d000..c2aeebcd44b84bc851dfcb80f26211c7e7e0be3c 100644 (file)
@@ -296,9 +296,9 @@ public class ConnectorTracker implements Serializable {
                 uninitializedConnectors.remove(connector);
                 diffStates.remove(connector);
                 iterator.remove();
-            } else if (!LegacyCommunicationManager
-                    .isConnectorVisibleToClient(connector)
-                    && !uninitializedConnectors.contains(connector)) {
+            } else if (!uninitializedConnectors.contains(connector)
+                    && !LegacyCommunicationManager
+                            .isConnectorVisibleToClient(connector)) {
                 uninitializedConnectors.add(connector);
                 diffStates.remove(connector);
                 if (getLogger().isLoggable(Level.FINE)) {