diff options
-rw-r--r-- | client/src/com/vaadin/client/communication/MessageHandler.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/communication/MessageHandler.java b/client/src/com/vaadin/client/communication/MessageHandler.java index e86c94c8c6..e87928fc57 100644 --- a/client/src/com/vaadin/client/communication/MessageHandler.java +++ b/client/src/com/vaadin/client/communication/MessageHandler.java @@ -546,6 +546,16 @@ public class MessageHandler { .getTime()); totalProcessingTime += lastProcessingTime; if (bootstrapTime == 0) { + + double fetchStart = getFetchStartTime(); + if (fetchStart != 0) { + int time = (int) (Duration.currentTimeMillis() - fetchStart); + getLogger().log( + Level.INFO, + "First response processed " + time + + " ms after fetchStart"); + } + bootstrapTime = calculateBootstrapTime(); if (Profiler.isEnabled() && bootstrapTime != -1) { Profiler.logBootstrapTimings(); @@ -1747,4 +1757,13 @@ public class MessageHandler { return parseJson(stripJSONWrapping(wrappedJsonText)); } + private static final native double getFetchStartTime() + /*-{ + if ($wnd.performance && $wnd.performance.timing && $wnd.performance.timing.fetchStart) { + return $wnd.performance.timing.fetchStart; + } else { + return 0; + } + }-*/; + } |