]> source.dussan.org Git - vaadin-framework.git/commitdiff
Improved AbstractClientConnector performance (#12219)
authorFabian Lange <lange.fabian@gmail.com>
Sun, 14 Jul 2013 14:38:26 +0000 (16:38 +0200)
committerVaadin Code Review <review@vaadin.com>
Mon, 15 Jul 2013 05:27:23 +0000 (05:27 +0000)
Avoiding duplicate lookup of connector hierarchy when a component shall be
marked dirty. Optimized if statement to fail fast.

Change-Id: I3ac82d64b235ebfd1888a6076c595f351018d887

server/src/com/vaadin/server/AbstractClientConnector.java

index c3101924dd074b74ec024280f94f7ef8ab76b9e0..91a9e41522ed5e2975640cebd8ea50cff086ea0a 100644 (file)
@@ -224,9 +224,9 @@ public abstract class AbstractClientConnector implements ClientConnector,
         }
         if (markAsDirty) {
             UI ui = getUI();
-            if (ui != null && !ui.getConnectorTracker().isWritingResponse()
-                    && !ui.getConnectorTracker().isDirty(this)) {
-                markAsDirty();
+            if (ui != null && !ui.getConnectorTracker().isDirty(this)
+                    && !ui.getConnectorTracker().isWritingResponse()) {
+                ui.getConnectorTracker().markDirty(this);
             }
         }
         return sharedState;