Hello, it took me some time but I've managed to get GWT Super Dev Mode (codeserver) running.
Based on instructions at [1] + [2], I wrote a patch (attached) that works like this: a, build Engine with WebAdmin GUI for Firefox & Chrome engine_buildDir=/path/to/engine/build engine_userAgent='gecko1_8,safari' make install-dev PREFIX=$engine_buildDir DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS="-Dgwt.userAgent=$engine_userAgent" BUILD_GWT_WEBADMIN=1 b, setup and start Engine $engine_buildDir/bin/engine-setup $engine_buildDir/share/ovirt-engine/services/ovirt-engine/ovirt-engine.py start c, start GWT Super Dev Mode (codeserver) make gwt-debug DEBUG_MODULE=webadmin DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS="-Dgwt.userAgent=$engine_userAgent" DEV_GWT_SUPER_DEV_MODE=1 Notice that I've added new Makefile option -> DEV_GWT_SUPER_DEV_MODE (default is 0 which means classic Dev Mode) During its startup, Super Dev Mode compiles WebAdmin (with source maps enabled) and prints this: [INFO] The code server is ready. [INFO] Next, visit: http://vszocs.laptop:9876/ If your browser supports source maps, it means you'll be able to inspect Java source code right inside the browser. To enable source maps in Firefox: http://www.codeproject.com/Articles/649271/How-to-Enable-Source-Maps-in-Firefox To enable source maps in Chrome: https://developers.google.com/chrome-developer-tools/docs/javascript-debugging#source-maps Now you can open http://127.0.0.1:9876/ and add "Dev Mode On" + "Dev Mode Off" bookmarklets to your browser's bookmark bar. After this, open http://127.0.0.1:8080/ovirt-engine/webadmin/WebAdmin.html --> must be *without* "?gwt.codesvr=127.0.0.1:9997" stuff! You now have compiled WebAdmin running in your browser, click "Dev Mode On" bookmark in your browser's bookmark bar. However, after clicking "Dev Mode On", WebAdmin is greyed-out, with title saying "This module doesn't have Super Dev Mode enabled". So apparently I'm missing some final piece of the puzzle here, maybe Greg can look into this :) EDIT: I think the solution is to pass "-Dgwt.devModeEnabled=true" during GWT compilation in step a, mentioned above. Because it's too late for me to think properly, I'll continue next week. [1] http://stackoverflow.com/questions/11356714/getting-started-with-the-superdevmode [2] http://stackoverflow.com/questions/22115078/can-not-reflect-changes-using-gwt-maven-plugin-superdev Regards, Vojtech ----- Original Message ----- > From: "Vojtech Szocs" <vsz...@redhat.com> > To: "Greg Sheremeta" <gsher...@redhat.com> > Cc: "engine-devel" <engine-devel@ovirt.org> > Sent: Friday, March 21, 2014 3:22:30 PM > Subject: Re: [Engine-devel] GWT Dev Mode unbearably slow in WebAdmin > > > > ----- Original Message ----- > > From: "Greg Sheremeta" <gsher...@redhat.com> > > To: "Vojtech Szocs" <vsz...@redhat.com> > > Cc: "engine-devel" <engine-devel@ovirt.org> > > Sent: Friday, March 21, 2014 3:15:03 PM > > Subject: Re: [Engine-devel] GWT Dev Mode unbearably slow in WebAdmin > > > > > > > > ----- Original Message ----- > > > From: "Vojtech Szocs" <vsz...@redhat.com> > > > To: "Greg Sheremeta" <gsher...@redhat.com> > > > Cc: "engine-devel" <engine-devel@ovirt.org> > > > Sent: Friday, March 21, 2014 10:11:38 AM > > > Subject: Re: [Engine-devel] GWT Dev Mode unbearably slow in WebAdmin > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Greg Sheremeta" <gsher...@redhat.com> > > > > To: "Vojtech Szocs" <vsz...@redhat.com> > > > > Cc: "engine-devel" <engine-devel@ovirt.org> > > > > Sent: Friday, March 21, 2014 3:04:17 PM > > > > Subject: Re: [Engine-devel] GWT Dev Mode unbearably slow in WebAdmin > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Vojtech Szocs" <vsz...@redhat.com> > > > > > To: "Greg Sheremeta" <gsher...@redhat.com> > > > > > Cc: "engine-devel" <engine-devel@ovirt.org> > > > > > Sent: Friday, March 21, 2014 9:57:00 AM > > > > > Subject: Re: [Engine-devel] GWT Dev Mode unbearably slow in WebAdmin > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > From: "Greg Sheremeta" <gsher...@redhat.com> > > > > > > To: "engine-devel" <engine-devel@ovirt.org> > > > > > > Sent: Friday, March 21, 2014 1:32:54 AM > > > > > > Subject: Re: [Engine-devel] GWT Dev Mode unbearably slow in > > > > > > WebAdmin > > > > > > > > > > > > I'm afraid I need to resurrect this. I'm again seeing unbearable > > > > > > slowness > > > > > > with GWT Dev Mode in webadmin on master. The first load is > > > > > > tolerable, > > > > > > and > > > > > > one or two refreshes are ok, but after that it bogs down and is > > > > > > unusable. > > > > > > > > > > Some suggestions (that have been already mentioned in this thread a > > > > > while > > > > > ago): > > > > > > > > > > 1, use gwt-maven-plugin 2.5.1 instead of 2.4.0 > > > > > in root pom.xml change > > > > > > > > > > <gwt-maven-plugin.workingRefresh.version>2.4.0</gwt-maven-plugin.workingRefresh.version> > > > > > to > > > > > > > > > > <gwt-maven-plugin.workingRefresh.version>${gwt.version}</gwt-maven-plugin.workingRefresh.version> > > > > > > > > > > 2, disable GWT persistent unit cache > > > > > in frontend/webadmin/modules/pom.xml find > > > > > <artifactId>gwt-maven-plugin</artifactId> > > > > > add <persistentunitcache>false</persistentunitcache> to > > > > > <configuration> > > > > > -or- > > > > > make gwt-debug [usual options] > > > > > DEV_EXTRA_BUILD_FLAGS="-Dgwt.persistentunitcache=false" > > > > > > > > > > 3, try out GWT Super Dev Mode > > > > > > > > > > Vojtech > > > > > > > > Vojtech, you're not experiencing this slowness? > > > > > > In fact, I am .. (and I have quite powerful laptop) > > > > > > The slowness is a combination of two factors, lots of UI code (for GWT > > > compiler to process) + on-the-fly recompilation of GWT Dev Mode. The > > > "lots > > > of code" factor should be improved when we transition to REST API and > > > introduce other UI improvements (like alternative/dynamic i18n > > > implementation, possibly UiCommon code refactoring, etc). > > > > > > I've seen that people tend to use Super Dev Mode for basic debugging, > > > falling > > > back to Classic (slow) Dev Mode for deeper debugging. (So far, I didn't > > > have > > > time to try out Super Dev Mode myself.) > > > > Alright. I'm trying out Super Dev Mode right now. > > Cool, thanks! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Anyone else? > > > > > > > > > > > > Greg > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > > From: "Greg Sheremeta" <gsher...@redhat.com> > > > > > > > To: aw...@redhat.com > > > > > > > Cc: "engine-devel" <engine-devel@ovirt.org> > > > > > > > Sent: Thursday, February 27, 2014 9:26:40 AM > > > > > > > Subject: Re: [Engine-devel] GWT Dev Mode unbearably slow in > > > > > > > WebAdmin > > > > > > > > > > > > > > Thanks, and great work figuring it out :) > > > > > > > > > > > > > > Greg > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > > > From: "Alexander Wels" <aw...@redhat.com> > > > > > > > > To: "Greg Sheremeta" <gsher...@redhat.com> > > > > > > > > Cc: "Lior Vernia" <lver...@redhat.com>, "Martin Betak" > > > > > > > > <mbe...@redhat.com>, > > > > > > > > "engine-devel" <engine-devel@ovirt.org>, > > > > > > > > "Vojtech Szocs" <vsz...@redhat.com> > > > > > > > > Sent: Thursday, February 27, 2014 8:32:00 AM > > > > > > > > Subject: Re: [Engine-devel] GWT Dev Mode unbearably slow in > > > > > > > > WebAdmin > > > > > > > > > > > > > > > > Master is back to its normal zippy self in GWT dev mode as of > > > > > > > > 8:25 > > > > > > > > EST > > > > > > > > Feb > > > > > > > > 27th 2014. With relative values for zippy. If you are annoyed > > > > > > > > by > > > > > > > > the > > > > > > > > slow > > > > > > > > GTW > > > > > > > > dev mode be sure to fetch and rebase. > > > > > > > > > > > > > > > > On Wednesday, February 19, 2014 10:51:06 AM Greg Sheremeta > > > > > > > > wrote: > > > > > > > > > I agree with Lior. Alexander (cc'd) has a patch that will > > > > > > > > > hopefully > > > > > > > > > address > > > > > > > > > it. > > > > > > > > > > > > > > > > > > Greg > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > > > > > > > > > > > > > > From: "Lior Vernia" <lver...@redhat.com> > > > > > > > > > > To: "Martin Betak" <mbe...@redhat.com> > > > > > > > > > > Cc: "Greg Sheremeta" <gsher...@redhat.com>, "engine-devel" > > > > > > > > > > <engine-devel@ovirt.org>, "Vojtech Szocs" > > > > > > > > > > <vsz...@redhat.com> > > > > > > > > > > Sent: Wednesday, February 19, 2014 10:27:51 AM > > > > > > > > > > Subject: Re: [Engine-devel] GWT Dev Mode unbearably slow in > > > > > > > > > > WebAdmin > > > > > > > > > > > > > > > > > > > > Hi guys, > > > > > > > > > > > > > > > > > > > > On 17/02/14 13:15, Martin Betak wrote: > > > > > > > > > > > Yes, this has been my developer experience since I joined > > > > > > > > > > > the > > > > > > > > > > > project. > > > > > > > > > > > > > > > > > > > > To my eyes, it hasn't always been this slow. Something > > > > > > > > > > aggravated > > > > > > > > > > the > > > > > > > > > > situation sometime in the past 3 weeks. I'm not > > > > > > > > > > knowledgeable > > > > > > > > > > enough > > > > > > > > > > to > > > > > > > > > > say what went wrong, but this is not simply a gradual > > > > > > > > > > degradation > > > > > > > > > > of > > > > > > > > > > more code being compiled, etc. > > > > > > > > > > > > > > > > > > > > Lior. > > > > > > > > > > > > > > > > > > > > > The 5-6 minute page-loads are a standard but the GWT Dev > > > > > > > > > > > Mode > > > > > > > > > > > gets > > > > > > > > > > > progressively > > > > > > > > > > > slower after each "refresh" that involves frontend > > > > > > > > > > > recompilation. > > > > > > > > > > > Also > > > > > > > > > > > the > > > > > > > > > > > memory > > > > > > > > > > > consumption increases and after 5-th "refresh" or so I > > > > > > > > > > > have > > > > > > > > > > > to > > > > > > > > > > > kill > > > > > > > > > > > it > > > > > > > > > > > and > > > > > > > > > > > recompile the whole engine. > > > > > > > > > > > > > > > > > > > > > > Any improvement to current status would be much > > > > > > > > > > > appreciated. > > > > > > > > > > > > > > > > > > > > > > Martin > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > > > > > > > > > > > > > > > > >> From: "Greg Sheremeta" <gsher...@redhat.com> > > > > > > > > > > >> To: "engine-devel" <engine-devel@ovirt.org> > > > > > > > > > > >> Sent: Friday, February 14, 2014 4:50:46 PM > > > > > > > > > > >> Subject: [Engine-devel] GWT Dev Mode unbearably slow in > > > > > > > > > > >> WebAdmin > > > > > > > > > > >> > > > > > > > > > > >> Has anyone else noticed that GWT Dev Mode is unbearably > > > > > > > > > > >> slow > > > > > > > > > > >> for > > > > > > > > > > >> WebAdmin? > > > > > > > > > > >> On > > > > > > > > > > >> my machine, it's to the point where I might as well > > > > > > > > > > >> rebuild > > > > > > > > > > >> the > > > > > > > > > > >> entire > > > > > > > > > > >> application for every change and not bother with Dev > > > > > > > > > > >> Mode. > > > > > > > > > > >> Pages > > > > > > > > > > >> take > > > > > > > > > > >> 4 > > > > > > > > > > >> or > > > > > > > > > > >> 5 > > > > > > > > > > >> minutes to render. Sometimes after 5 minutes, I just > > > > > > > > > > >> give > > > > > > > > > > >> up, > > > > > > > > > > >> close > > > > > > > > > > >> everything, and rebuild the app. > > > > > > > > > > >> > > > > > > > > > > >> For now, I want to see if others have this issue. If we > > > > > > > > > > >> confirm > > > > > > > > > > >> that > > > > > > > > > > >> it's > > > > > > > > > > >> widespread, we can discuss ways to mitigate. > > > > > > > > > > >> > > > > > > > > > > >> Greg Sheremeta > > > > > > > > > > >> Red Hat, Inc. > > > > > > > > > > >> Sr. Software Engineer, RHEV > > > > > > > > > > >> Cell: 919-807-1086 > > > > > > > > > > >> gsher...@redhat.com > > > > > > > > > > >> _______________________________________________ > > > > > > > > > > >> Engine-devel mailing list > > > > > > > > > > >> Engine-devel@ovirt.org > > > > > > > > > > >> http://lists.ovirt.org/mailman/listinfo/engine-devel > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > Engine-devel mailing list > > > > > > > > > > > Engine-devel@ovirt.org > > > > > > > > > > > http://lists.ovirt.org/mailman/listinfo/engine-devel > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Engine-devel mailing list > > > > > > > Engine-devel@ovirt.org > > > > > > > http://lists.ovirt.org/mailman/listinfo/engine-devel > > > > > > > > > > > > > _______________________________________________ > > > > > > Engine-devel mailing list > > > > > > Engine-devel@ovirt.org > > > > > > http://lists.ovirt.org/mailman/listinfo/engine-devel > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > Engine-devel mailing list > Engine-devel@ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel >
From 31e07eebf8a83be76fbae775a6ab3c287fa3e8a7 Mon Sep 17 00:00:00 2001 From: Vojtech Szocs <vsz...@redhat.com> Date: Fri, 21 Mar 2014 22:49:22 +0100 Subject: [PATCH] Playing with GWT Super Dev Mode Change-Id: I6e03534e8af4f9c61d93bb715b80b433127cc4e9 Signed-off-by: Vojtech Szocs <vsz...@redhat.com> --- Makefile | 8 +++++++- frontend/webadmin/modules/webadmin/pom.xml | 17 ++++++++++++++++- .../org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml | 10 ++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a97a6f0..0a6c4d4 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,7 @@ DEV_REBUILD=1 DEV_BUILD_GWT_DRAFT=0 DEV_EXTRA_BUILD_FLAGS= DEV_EXTRA_BUILD_FLAGS_GWT_DEFAULTS=-D gwt.userAgent=gecko1_8 +DEV_GWT_SUPER_DEV_MODE=0 PACKAGE_NAME=ovirt-engine ENGINE_NAME=$(PACKAGE_NAME) @@ -110,6 +111,11 @@ BUILD_FLAGS:=$(BUILD_FLAGS) $(DEV_BUILD_FLAGS) endif BUILD_FLAGS:=$(BUILD_FLAGS) $(EXTRA_BUILD_FLAGS) +DEV_GWT_DEBUG_TARGET=gwt:debug +ifneq ($(DEV_GWT_SUPER_DEV_MODE),0) +DEV_GWT_DEBUG_TARGET=process-classes gwt:run-codeserver +endif + PYTHON_SYS_DIR:=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib as f;print(f())") OUTPUT_RPMBUILD=$(shell pwd -P)/tmp.rpmbuild OUTPUT_DIR=output @@ -421,7 +427,7 @@ gwt-debug: $(DEV_EXTRA_BUILD_FLAGS) \ -Dgwt.noserver=true \ -Pgwtdev,gwt-admin,gwt-user \ - gwt:debug + $(DEV_GWT_DEBUG_TARGET) all-dev: [ "$(DEV_REBUILD)" != 0 ] && rm -f "$(BUILD_FILE)" || : diff --git a/frontend/webadmin/modules/webadmin/pom.xml b/frontend/webadmin/modules/webadmin/pom.xml index e2bc1cb..29d2893 100644 --- a/frontend/webadmin/modules/webadmin/pom.xml +++ b/frontend/webadmin/modules/webadmin/pom.xml @@ -130,6 +130,9 @@ <scope>test</scope> </dependency> </dependencies> + <properties> + <gwt.devModeEnabled>false</gwt.devModeEnabled> + </properties> <build> <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes </outputDirectory> @@ -239,13 +242,25 @@ </profile> <profile> <id>gwtdev</id> + <properties> + <gwt.devModeEnabled>true</gwt.devModeEnabled> + </properties> <build> <pluginManagement> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> - <version>${gwt-maven-plugin.workingRefresh.version}</version> + <dependencies> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-codeserver</artifactId> + <version>${gwt.version}</version> + </dependency> + </dependencies> + <configuration> + <codeServerPort>9876</codeServerPort> + </configuration> </plugin> </plugins> </pluginManagement> diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml index f3b7664..76696e8 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/WebAdmin.gwt.xml @@ -39,4 +39,14 @@ <set-property name="locale" value="${gwt.locale}" /> <set-property-fallback name="locale" value="en_US" /> + <!-- Use xsiframe linker that combines cross-site friendliness of xs linker + with iframe sandboxing of std linker. Note that xsiframe linker is the + only linker that currently supports GWT Super Dev Mode. It also seems + that xsiframe linker will be the default linker in GWT > 2.6 release. --> + <add-linker name="xsiframe"/> + + <!-- GWT Super Dev Mode settings --> + <set-configuration-property name="devModeRedirectEnabled" value="${gwt.devModeEnabled}"/> + <set-property name="compiler.useSourceMaps" value="${gwt.devModeEnabled}" /> + </module> -- 1.8.3.1
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel