@Override
public void execute() {
+ Profiler.enter("ApplicationConfiguration.startApplication");
ApplicationConfiguration appConf = getConfigFromDOM(applicationId);
ApplicationConnection a = GWT
.create(ApplicationConnection.class);
a.init(widgetSet, appConf);
runningApplications.add(a);
+ Profiler.leave("ApplicationConfiguration.startApplication");
+
a.start();
}
});
@Override
public void onModuleLoad() {
+ Profiler.reset();
+ Profiler.enter("ApplicationConfiguration.onModuleLoad");
BrowserInfo browserInfo = BrowserInfo.get();
VConsole.getImplementation().error(e);
}
});
+ Profiler.leave("ApplicationConfiguration.onModuleLoad");
if (SuperDevMode.enableBasedOnParameter()) {
// Do not start any application as super dev mode will refresh the
return;
}
- Profiler.reset();
-
VConsole.log("Handling message from server");
eventBus.fireEvent(new ResponseHandlingStartedEvent(this));
}
}
+ Profiler.enter("updateConnectorState newWithoutState");
// Fire events for properties using the default value for newly
// created connectors even if there were no state changes
for (ServerConnector connector : remainingNewConnectors) {
events.add(event);
}
+ Profiler.leave("updateConnectorState newWithoutState");
Profiler.leave("updateConnectorState");
* Widget which DOM handlers are connected
*/
public void connectHandlersToWidget(Widget widget) {
+ Profiler.enter("VTooltip.connectHandlersToWidget");
widget.addDomHandler(tooltipEventHandler, MouseMoveEvent.getType());
widget.addDomHandler(tooltipEventHandler, ClickEvent.getType());
widget.addDomHandler(tooltipEventHandler, KeyDownEvent.getType());
+ Profiler.leave("VTooltip.connectHandlersToWidget");
}
}
import java.util.Collections;
import java.util.List;
+import com.vaadin.client.Profiler;
+
public abstract class AsyncBundleLoader {
public enum State {
NOT_STARTED, LOADING, LOADED, ERROR;
public void load(BundleLoadCallback callback, TypeDataStore store) {
assert state == State.NOT_STARTED;
+ Profiler.enter("AsyncBundleLoader.load");
state = State.LOADING;
addCallback(callback);
load(store);
+ Profiler.leave("AsyncBundleLoader.load");
}
public void addCallback(BundleLoadCallback callback) {
import com.vaadin.client.ComponentConnector;
import com.vaadin.client.HasComponentsConnector;
import com.vaadin.client.LayoutManager;
+import com.vaadin.client.Profiler;
import com.vaadin.client.ServerConnector;
import com.vaadin.client.StyleConstants;
import com.vaadin.client.TooltipInfo;
@Override
public Widget getWidget() {
if (widget == null) {
+ Profiler.enter("AbstractComponentConnector.createWidget for "
+ + Util.getSimpleName(this));
widget = createWidget();
+ Profiler.leave("AbstractComponentConnector.createWidget for "
+ + Util.getSimpleName(this));
}
return widget;
@Override
public void onStateChanged(StateChangeEvent stateChangeEvent) {
+ Profiler.enter("AbstractComponentConnector.onStateChanged");
+ Profiler.enter("AbstractComponentConnector.onStateChanged update id");
if (stateChangeEvent.hasPropertyChanged("id")) {
if (getState().id != null) {
getWidget().getElement().setId(getState().id);
getWidget().getElement().removeAttribute("id");
}
}
+ Profiler.leave("AbstractComponentConnector.onStateChanged update id");
/*
* Disabled state may affect (override) tabindex so the order must be
* first setting tabindex, then enabled state (through super
* implementation).
*/
+ Profiler.enter("AbstractComponentConnector.onStateChanged update tab index");
if (getState() instanceof TabIndexState
&& getWidget() instanceof Focusable) {
((Focusable) getWidget())
.setTabIndex(((TabIndexState) getState()).tabIndex);
}
+ Profiler.leave("AbstractComponentConnector.onStateChanged update tab index");
super.onStateChanged(stateChangeEvent);
updateComponentSize();
initialStateEvent = false;
+
+ Profiler.leave("AbstractComponentConnector.onStateChanged");
}
@Override
}
private void updateComponentSize() {
+ Profiler.enter("AbstractComponentConnector.updateComponentSize");
+
String newWidth = getState().width == null ? "" : getState().width;
String newHeight = getState().height == null ? "" : getState().height;
// Set defined sizes
Widget widget = getWidget();
+ Profiler.enter("AbstractComponentConnector.updateComponentSize update styleNames");
widget.setStyleName("v-has-width", !isUndefinedWidth());
widget.setStyleName("v-has-height", !isUndefinedHeight());
+ Profiler.leave("AbstractComponentConnector.updateComponentSize update styleNames");
+ Profiler.enter("AbstractComponentConnector.updateComponentSize update DOM");
widget.setHeight(newHeight);
widget.setWidth(newWidth);
+ Profiler.leave("AbstractComponentConnector.updateComponentSize update DOM");
+
+ Profiler.leave("AbstractComponentConnector.updateComponentSize");
}
@Override
* </p>
*/
protected void updateWidgetStyleNames() {
+ Profiler.enter("AbstractComponentConnector.updateWidgetStyleNames");
AbstractComponentState state = getState();
String primaryStyleName = getWidget().getStylePrimaryName();
}
}
-
+ Profiler.leave("AbstractComponentConnector.updateWidgetStyleNames");
}
/**
}
if (statePropertyHandlerManagers != null
&& event instanceof StateChangeEvent) {
+ Profiler.enter("AbstractConnector.fireEvent statePropertyHandlerManagers");
StateChangeEvent stateChangeEvent = (StateChangeEvent) event;
JsArrayString keys = statePropertyHandlerManagers.getKeys();
for (int i = 0; i < keys.length(); i++) {
statePropertyHandlerManagers.get(property).fireEvent(event);
}
}
+ Profiler.leave("AbstractConnector.fireEvent statePropertyHandlerManagers");
}
if (Profiler.isEnabled()) {
Profiler.leave(profilerKey);
if (lastEnabledState == enabledState) {
return;
}
+ Profiler.enter("AbstractConnector.updateEnabledState");
lastEnabledState = enabledState;
for (ServerConnector c : getChildren()) {
// their parent
c.updateEnabledState(c.isEnabled());
}
+ Profiler.leave("AbstractConnector.updateEnabledState");
}
/**
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Widget;
+import com.vaadin.client.Profiler;
import com.vaadin.client.StyleConstants;
/**
* For internal use only. May be removed or replaced in the future.
*/
public void addOrMove(Widget child, int index) {
+ Profiler.enter("VCssLayout.addOrMove");
if (child.getParent() == this) {
int currentIndex = getWidgetIndex(child);
if (index == currentIndex) {
+ Profiler.leave("VCssLayout.addOrMove");
return;
}
}
insert(child, index);
+ Profiler.leave("VCssLayout.addOrMove");
}
}
import com.vaadin.client.ConnectorMap;
import com.vaadin.client.Focusable;
import com.vaadin.client.LayoutManager;
+import com.vaadin.client.Profiler;
import com.vaadin.client.VConsole;
import com.vaadin.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner;
import com.vaadin.client.ui.TouchScrollDelegate.TouchScrollHandler;
* For internal use only. May be removed or replaced in the future.
*/
public void sendClientResized() {
+ Profiler.enter("VUI.sendClientResized");
Element parentElement = getElement().getParentElement();
int viewHeight = parentElement.getClientHeight();
int viewWidth = parentElement.getClientWidth();
ResizeEvent.fire(this, viewWidth, viewHeight);
+ Profiler.leave("VUI.sendClientResized");
}
public native static void goTo(String url)
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.PreElement;
+import com.vaadin.client.Profiler;
import com.vaadin.client.Util;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractComponentConnector;
public void onStateChanged(StateChangeEvent stateChangeEvent) {
super.onStateChanged(stateChangeEvent);
boolean sinkOnloads = false;
+ Profiler.enter("LabelConnector.onStateChanged update content");
switch (getState().contentMode) {
case PREFORMATTED:
PreElement preElement = Document.get().createPreElement();
break;
}
+ Profiler.leave("LabelConnector.onStateChanged update content");
+
if (sinkOnloads) {
+ Profiler.enter("LabelConnector.onStateChanged sinkOnloads");
Util.sinkOnloadForImages(getWidget().getElement());
+ Profiler.leave("LabelConnector.onStateChanged sinkOnloads");
}
}