[Engine-devel] GWT Dev Mode unbearably slow in WebAdmin

Vojtech Szocs vszocs at redhat.com
Fri Mar 21 21:51:11 UTC 2014


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" <vszocs at redhat.com>
> To: "Greg Sheremeta" <gshereme at redhat.com>
> Cc: "engine-devel" <engine-devel at 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" <gshereme at redhat.com>
> > To: "Vojtech Szocs" <vszocs at redhat.com>
> > Cc: "engine-devel" <engine-devel at 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" <vszocs at redhat.com>
> > > To: "Greg Sheremeta" <gshereme at redhat.com>
> > > Cc: "engine-devel" <engine-devel at 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" <gshereme at redhat.com>
> > > > To: "Vojtech Szocs" <vszocs at redhat.com>
> > > > Cc: "engine-devel" <engine-devel at 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" <vszocs at redhat.com>
> > > > > To: "Greg Sheremeta" <gshereme at redhat.com>
> > > > > Cc: "engine-devel" <engine-devel at 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" <gshereme at redhat.com>
> > > > > > To: "engine-devel" <engine-devel at 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" <gshereme at redhat.com>
> > > > > > > To: awels at redhat.com
> > > > > > > Cc: "engine-devel" <engine-devel at 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" <awels at redhat.com>
> > > > > > > > To: "Greg Sheremeta" <gshereme at redhat.com>
> > > > > > > > Cc: "Lior Vernia" <lvernia at redhat.com>, "Martin Betak"
> > > > > > > > <mbetak at redhat.com>,
> > > > > > > > "engine-devel" <engine-devel at ovirt.org>,
> > > > > > > > "Vojtech Szocs" <vszocs at 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" <lvernia at redhat.com>
> > > > > > > > > > To: "Martin Betak" <mbetak at redhat.com>
> > > > > > > > > > Cc: "Greg Sheremeta" <gshereme at redhat.com>, "engine-devel"
> > > > > > > > > > <engine-devel at ovirt.org>, "Vojtech Szocs"
> > > > > > > > > > <vszocs at 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" <gshereme at redhat.com>
> > > > > > > > > > >> To: "engine-devel" <engine-devel at 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
> > > > > > > > > > >> gshereme at redhat.com
> > > > > > > > > > >> _______________________________________________
> > > > > > > > > > >> Engine-devel mailing list
> > > > > > > > > > >> Engine-devel at ovirt.org
> > > > > > > > > > >> http://lists.ovirt.org/mailman/listinfo/engine-devel
> > > > > > > > > > > 
> > > > > > > > > > > _______________________________________________
> > > > > > > > > > > Engine-devel mailing list
> > > > > > > > > > > Engine-devel at ovirt.org
> > > > > > > > > > > http://lists.ovirt.org/mailman/listinfo/engine-devel
> > > > > > > > 
> > > > > > > > 
> > > > > > > _______________________________________________
> > > > > > > Engine-devel mailing list
> > > > > > > Engine-devel at ovirt.org
> > > > > > > http://lists.ovirt.org/mailman/listinfo/engine-devel
> > > > > > > 
> > > > > > _______________________________________________
> > > > > > Engine-devel mailing list
> > > > > > Engine-devel at ovirt.org
> > > > > > http://lists.ovirt.org/mailman/listinfo/engine-devel
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Playing-with-GWT-Super-Dev-Mode.patch
Type: text/x-patch
Size: 4219 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/engine-devel/attachments/20140321/92547d7d/attachment.bin>


More information about the Engine-devel mailing list