diff options
author | Henri Sara <hesara@vaadin.com> | 2013-08-28 10:12:15 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-08-28 09:13:59 +0000 |
commit | 8ce45c7bedc2ef04db9f7d34fd214fe0b8079926 (patch) | |
tree | e15ca7ab5356c105b84cf1ac888d825359cf9998 /client | |
parent | a52b28650f219e6e36e7438c45db304b8315435f (diff) | |
download | vaadin-framework-8ce45c7bedc2ef04db9f7d34fd214fe0b8079926.tar.gz vaadin-framework-8ce45c7bedc2ef04db9f7d34fd214fe0b8079926.zip |
Disable slow sanity check when not in debug mode (#12463)
Change-Id: I98d0a3254a92bce728d56a591914e727f5ef3aa8
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ApplicationConnection.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java index dc3378560e..0d9c859ee8 100644 --- a/client/src/com/vaadin/client/ApplicationConnection.java +++ b/client/src/com/vaadin/client/ApplicationConnection.java @@ -1686,8 +1686,15 @@ public class ApplicationConnection { for (int i = 0; i < size; i++) { ServerConnector c = currentConnectors.get(i); if (c.getParent() != null) { - if (!c.getParent().getChildren().contains(c)) { - VConsole.error("ERROR: Connector is connected to a parent but the parent does not contain the connector"); + // only do this check if debug mode is active + if (ApplicationConfiguration.isDebugMode()) { + Profiler.enter("unregisterRemovedConnectors check parent - this is only performed in debug mode"); + // this is slow for large layouts, 25-30% of total + // time for some operations even on modern browsers + if (!c.getParent().getChildren().contains(c)) { + VConsole.error("ERROR: Connector is connected to a parent but the parent does not contain the connector"); + } + Profiler.leave("unregisterRemovedConnectors check parent - this is only performed in debug mode"); } } else if (c == getUIConnector()) { // UIConnector for this connection, leave as-is |