Why Vaadin 7 is much slower to compile than Vaadin 6?

Hi,
We’ve been using Vaadin 6 for 3 years now and we loved it!
Vaadin 7 went out and we thought: “let’s give it a shot!”
Unfortunately, it seems you guys included GWT inside the vaadin now (as CORE COMPONENT) and it seems we’re working with GWT from now on.

I don’t know what it’s the different but in Vaadin 6 I don’t have the follow output (project was created through the command: mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=7.0.3 -Dpackaging=war)

This kind of output is very familiar to me, when you use GWT it happens all the time.

Question: Why it has to happen? I don’t have anything created for GWT. As you can see, it took 2:02.758s to build a dumb project (just created from archetype, didn’t add anything).
Btw, Im running this with my MacbookPro 8GB RAM i7 quad core.

So I want to know how to skip this entire GWT compile thing.

Thanks in advance.

[INFO]

[INFO]

vaadin-maven-plugin:7.0.3:compile (default) @ teste >>>
[INFO]

[INFO]
— maven-resources-plugin:2.5:resources (default-resources) @ teste —
[debug]
execute contextualize
[INFO]
Using ‘UTF-8’ encoding to copy filtered resources.
[INFO]
skip non existing resourceDirectory /Users/casmeiron/temp/vaadin/teste/src/main/resources
[INFO]

[INFO]
— vaadin-maven-plugin:7.0.3:resources (default) @ teste —
[INFO]
auto discovered modules [teste.AppWidgetSet]

[INFO]
1 source files from GWT module teste.AppWidgetSet
[INFO]

[INFO]
<<< vaadin-maven-plugin:7.0.3:compile (default) @ teste <<<
[INFO]

[INFO]
— vaadin-maven-plugin:7.0.3:compile (default) @ teste —
[INFO]
auto discovered modules [teste.AppWidgetSet]

[INFO]
Compiling module teste.AppWidgetSet
[INFO]
Computing all possible rebind results for ‘com.vaadin.client.metadata.ConnectorBundleLoader’
[INFO]
Rebinding com.vaadin.client.metadata.ConnectorBundleLoader
[INFO]
Invoking generator com.vaadin.server.widgetsetutils.ConnectorBundleLoaderFactory
[INFO]
Populating eager bundle
[INFO]
Visiting VerticalLayoutConnector with ConnectorInitVisitor
[INFO]
VerticalLayoutConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.orderedlayout.VerticalLayoutState as a bean
[INFO]
Will serialize class java.util.HashMap<com.vaadin.shared.Connector, com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState.ChildComponentData> as a bean
[INFO]
Will serialize class com.vaadin.shared.communication.URLReference using URLReference_Serializer
[INFO]
Will serialize class com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState.ChildComponentData as a bean
[INFO]
Visiting TableConnector with ConnectorInitVisitor
[INFO]
TableConnector will be in the eager bundle
[INFO]
Visiting TableConnector with WidgetInitVisitor
[INFO]
[WARN]
com.vaadin.client.ui.table.TableConnector has overridden getTooltipInfo
[INFO]
Will serialize class com.vaadin.shared.ui.table.TableState as a bean
[INFO]
Visiting UIConnector with ConnectorInitVisitor
[INFO]
UIConnector will be in the eager bundle
[INFO]
Visiting UIConnector with WidgetInitVisitor
[INFO]
[WARN]
com.vaadin.client.ui.ui.UIConnector has overridden getTooltipInfo
[INFO]
Will serialize class com.vaadin.shared.ui.ui.UIState as a bean
[INFO]
Visiting NativeSelectConnector with ConnectorInitVisitor
[INFO]
NativeSelectConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.AbstractFieldState as a bean
[INFO]
Visiting CustomComponentConnector with ConnectorInitVisitor
[INFO]
CustomComponentConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.AbstractComponentState as a bean
[INFO]
Visiting WindowConnector with ConnectorInitVisitor
[INFO]
WindowConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.window.WindowState as a bean
[INFO]
Visiting PasswordFieldConnector with ConnectorInitVisitor
[INFO]
PasswordFieldConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.textfield.AbstractTextFieldState as a bean
[INFO]
Visiting InlineDateFieldConnector with ConnectorInitVisitor
[INFO]
InlineDateFieldConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.datefield.InlineDateFieldState as a bean
[INFO]
Visiting PanelConnector with ConnectorInitVisitor
[INFO]
PanelConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.panel.PanelState as a bean
[INFO]
Visiting CustomFieldConnector with ConnectorInitVisitor
[INFO]
CustomFieldConnector will be in the eager bundle
[INFO]
Visiting DragAndDropWrapperConnector with ConnectorInitVisitor
[INFO]
DragAndDropWrapperConnector will be in the eager bundle
[INFO]
Visiting LinkConnector with ConnectorInitVisitor
[INFO]
LinkConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.link.LinkState as a bean
[INFO]
Visiting ImageConnector with ConnectorInitVisitor
[INFO]
ImageConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.image.ImageState as a bean
[INFO]
Visiting BrowserWindowOpenerConnector with ConnectorInitVisitor
[INFO]
BrowserWindowOpenerConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.BrowserWindowOpenerState as a bean
[INFO]
Visiting LabelConnector with ConnectorInitVisitor
[INFO]
LabelConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.label.LabelState as a bean
[INFO]
Will serialize class com.vaadin.shared.ui.label.ContentMode as an enum
[INFO]
Visiting BrowserFrameConnector with ConnectorInitVisitor
[INFO]
BrowserFrameConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.browserframe.BrowserFrameState as a bean
[INFO]
Visiting TabsheetConnector with ConnectorInitVisitor
[INFO]
TabsheetConnector will be in the eager bundle
[INFO]
Visiting TabsheetConnector with WidgetInitVisitor
[INFO]
[WARN]
com.vaadin.client.ui.tabsheet.TabsheetConnector has overridden getTooltipInfo
[INFO]
Will serialize class com.vaadin.shared.ui.tabsheet.TabsheetState as a bean
[INFO]
Visiting TreeConnector with ConnectorInitVisitor
[INFO]
TreeConnector will be in the eager bundle
[INFO]
Visiting TreeConnector with WidgetInitVisitor
[INFO]
[WARN]
com.vaadin.client.ui.tree.TreeConnector has overridden getTooltipInfo
[INFO]
Will serialize class com.vaadin.shared.ui.tree.TreeState as a bean
[INFO]
Visiting NativeButtonConnector with ConnectorInitVisitor
[INFO]
NativeButtonConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.button.NativeButtonState as a bean
[INFO]
Visiting EmbeddedConnector with ConnectorInitVisitor
[INFO]
EmbeddedConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.embedded.EmbeddedState as a bean
[INFO]
Visiting PopupDateFieldConnector with ConnectorInitVisitor
[INFO]
PopupDateFieldConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.datefield.PopupDateFieldState as a bean
[INFO]
Visiting FlashConnector with ConnectorInitVisitor
[INFO]
FlashConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.flash.FlashState as a bean
[INFO]
Visiting AudioConnector with ConnectorInitVisitor
[INFO]
AudioConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.AbstractMediaState as a bean
[INFO]
Visiting CssLayoutConnector with ConnectorInitVisitor
[INFO]
CssLayoutConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.csslayout.CssLayoutState as a bean
[INFO]
Visiting VideoConnector with ConnectorInitVisitor
[INFO]
VideoConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.video.VideoState as a bean
[INFO]
Visiting CustomLayoutConnector with ConnectorInitVisitor
[INFO]
CustomLayoutConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.customlayout.CustomLayoutState as a bean
[INFO]
Visiting AbsoluteLayoutConnector with ConnectorInitVisitor
[INFO]
AbsoluteLayoutConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutState as a bean
[INFO]
Visiting HorizontalLayoutConnector with ConnectorInitVisitor
[INFO]
HorizontalLayoutConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.orderedlayout.HorizontalLayoutState as a bean
[INFO]
Visiting TextFieldConnector with ConnectorInitVisitor
[INFO]
TextFieldConnector will be in the eager bundle
[INFO]
Visiting ListSelectConnector with ConnectorInitVisitor
[INFO]
ListSelectConnector will be in the eager bundle
[INFO]
Visiting FileDownloaderConnector with ConnectorInitVisitor
[INFO]
FileDownloaderConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.communication.SharedState as a bean
[INFO]
Visiting GridLayoutConnector with ConnectorInitVisitor
[INFO]
GridLayoutConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.gridlayout.GridLayoutState as a bean
[INFO]
Will serialize class com.vaadin.shared.ui.gridlayout.GridLayoutState.ChildComponentData as a bean
[INFO]
Visiting ButtonConnector with ConnectorInitVisitor
[INFO]
ButtonConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.button.ButtonState as a bean
[INFO]
Visiting TwinColSelectConnector with ConnectorInitVisitor
[INFO]
TwinColSelectConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.twincolselect.TwinColSelectState as a bean
[INFO]
Visiting FormConnector with ConnectorInitVisitor
[INFO]
FormConnector will be in the eager bundle
[INFO]
Visiting FormConnector with WidgetInitVisitor
[INFO]
[WARN]
com.vaadin.client.ui.form.FormConnector has overridden getTooltipInfo
[INFO]
Will serialize class com.vaadin.shared.ui.form.FormState as a bean
[INFO]
Visiting JavaScriptExtension with ConnectorInitVisitor
[INFO]
JavaScriptExtension will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.JavaScriptExtensionState as a bean
[INFO]
Visiting TextAreaConnector with ConnectorInitVisitor
[INFO]
TextAreaConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.textarea.TextAreaState as a bean
[INFO]
Visiting UploadConnector with ConnectorInitVisitor
[INFO]
UploadConnector will be in the eager bundle
[INFO]
Visiting FormLayoutConnector with ConnectorInitVisitor
[INFO]
FormLayoutConnector will be in the eager bundle
[INFO]
Visiting FormLayoutConnector with WidgetInitVisitor
[INFO]
[WARN]
com.vaadin.client.ui.formlayout.FormLayoutConnector has overridden getTooltipInfo
[INFO]
Will serialize class com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState as a bean
[INFO]
Visiting JavaScriptManagerConnector with ConnectorInitVisitor
[INFO]
JavaScriptManagerConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.extension.javascriptmanager.JavaScriptManagerState as a bean
[INFO]
Visiting ProgressIndicatorConnector with ConnectorInitVisitor
[INFO]
ProgressIndicatorConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.progressindicator.ProgressIndicatorState as a bean
[INFO]
Visiting SliderConnector with ConnectorInitVisitor
[INFO]
SliderConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.slider.SliderState as a bean
[INFO]
Will serialize class com.vaadin.shared.ui.slider.SliderOrientation as an enum
[INFO]
Visiting ComboBoxConnector with ConnectorInitVisitor
[INFO]
ComboBoxConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.combobox.ComboBoxState as a bean
[INFO]
Visiting CheckBoxConnector with ConnectorInitVisitor
[INFO]
CheckBoxConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.checkbox.CheckBoxState as a bean
[INFO]
Visiting AccordionConnector with ConnectorInitVisitor
[INFO]
AccordionConnector will be in the eager bundle
[INFO]
Visiting VerticalSplitPanelConnector with ConnectorInitVisitor
[INFO]
VerticalSplitPanelConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.splitpanel.VerticalSplitPanelState as a bean
[INFO]
Will serialize class com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState.SplitterState as a bean
[INFO]
Visiting JavaScriptComponentConnector with ConnectorInitVisitor
[INFO]
JavaScriptComponentConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.JavaScriptComponentState as a bean
[INFO]
Visiting OptionGroupConnector with ConnectorInitVisitor
[INFO]
OptionGroupConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.optiongroup.OptionGroupState as a bean
[INFO]
Visiting PopupViewConnector with ConnectorInitVisitor
[INFO]
PopupViewConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.popupview.PopupViewState as a bean
[INFO]
Visiting HorizontalSplitPanelConnector with ConnectorInitVisitor
[INFO]
HorizontalSplitPanelConnector will be in the eager bundle
[INFO]
Will serialize class com.vaadin.shared.ui.splitpanel.HorizontalSplitPanelState as a bean
[INFO]
Visiting TreeTableConnector with ConnectorInitVisitor
[INFO]
TreeTableConnector will be in the eager bundle
[INFO]
Visiting TreeTableConnector with WidgetInitVisitor
[INFO]
[WARN]
com.vaadin.client.ui.treetable.TreeTableConnector has overridden getTooltipInfo
[INFO]
Will serialize class com.vaadin.shared.ui.treetable.TreeTableState as a bean
[INFO]
Visiting MenuBarConnector with ConnectorInitVisitor
[INFO]
MenuBarConnector will be in the eager bundle
[INFO]
Visiting MenuBarConnector with WidgetInitVisitor
[INFO]
[WARN]
com.vaadin.client.ui.menubar.MenuBarConnector has overridden getTooltipInfo
[INFO]
Will serialize class com.vaadin.shared.ui.menubar.MenuBarState as a bean
[INFO]
Will serialize class com.vaadin.shared.MouseEventDetails as a bean
[INFO]
Will serialize class com.vaadin.shared.MouseEventDetails.MouseButton as an enum
[INFO]
Populating RichTextAreaConnector bundle
[INFO]
Visiting RichTextAreaConnector with ConnectorInitVisitor
[INFO]
RichTextAreaConnector will be in the RichTextAreaConnector bundle
[INFO]
Populating ColorPickerGradientConnector bundle
[INFO]
Visiting ColorPickerGradientConnector with ConnectorInitVisitor
[INFO]
ColorPickerGradientConnector will be in the ColorPickerGradientConnector bundle
[INFO]
Will serialize class com.vaadin.shared.ui.colorpicker.ColorPickerGradientState as a bean
[INFO]
Populating ColorPickerAreaConnector bundle
[INFO]
Visiting ColorPickerAreaConnector with ConnectorInitVisitor
[INFO]
ColorPickerAreaConnector will be in the ColorPickerAreaConnector bundle
[INFO]
Will serialize class com.vaadin.shared.ui.colorpicker.ColorPickerState as a bean
[INFO]
Populating ColorPickerConnector bundle
[INFO]
Visiting ColorPickerConnector with ConnectorInitVisitor
[INFO]
ColorPickerConnector will be in the ColorPickerConnector bundle
[INFO]
Will serialize class com.vaadin.shared.ui.colorpicker.ColorPickerState as a bean
[INFO]
Populating ColorPickerGridConnector bundle
[INFO]
Visiting ColorPickerGridConnector with ConnectorInitVisitor
[INFO]
ColorPickerGridConnector will be in the ColorPickerGridConnector bundle
[INFO]
Will serialize class com.vaadin.shared.ui.colorpicker.ColorPickerGridState as a bean
[INFO]
Will serialize java.lang.String as an array
[INFO]
Computing all possible rebind results for ‘com.vaadin.client.ui.dd.VAcceptCriterionFactory’
[INFO]
Rebinding com.vaadin.client.ui.dd.VAcceptCriterionFactory
[INFO]
Invoking generator com.vaadin.server.widgetsetutils.AcceptCriteriaFactoryGenerator
[INFO]
Detecting available criteria …
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.ContainsDataFlavor
[INFO]
creating mapping for com.vaadin.ui.AbstractSelect.AcceptItem
[INFO]
creating mapping for com.vaadin.ui.Tree.TreeDropCriterion
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.SourceIsTarget
[INFO]
creating mapping for com.vaadin.ui.Tree.TargetInSubtree
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.Or
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.Not
[INFO]
creating mapping for com.vaadin.ui.AbstractSelect.TargetItemIs
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.ServerSideCriterion
[INFO]
creating mapping for com.vaadin.ui.Table.TableDropCriterion
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.AcceptAll
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.TargetDetailIs
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.And
[INFO]
creating mapping for com.vaadin.event.dd.acceptcriteria.SourceIs
[INFO]
Done. (0seconds)
[INFO]
Compiling 6 permutations
[INFO]
Compiling permutation 0…
[INFO]
Process output
[INFO]
Compiling
[INFO]
Compiling permutation 3…
[INFO]
Process output
[INFO]
Compiling
[INFO]
Compiling permutation 4…
[INFO]
Process output
[INFO]
Compiling
[INFO]
Compiling permutation 1…
[INFO]
Process output
[INFO]
Compiling
[INFO]
Compiling permutation 5…
[INFO]
Process output
[INFO]
Compiling
[INFO]
Compiling permutation 2…
[INFO]
Compile of permutations succeeded
[INFO]
Linking into /Users/casmeiron/temp/vaadin/teste/src/main/webapp/VAADIN/widgetsets/teste.AppWidgetSet; Writing extras to /Users/casmeiron/temp/vaadin/teste/target/extra/teste.AppWidgetSet
[INFO]
Link succeeded
[INFO]
Compilation succeeded – 107.076s
[INFO]

[INFO]
— maven-war-plugin:2.1.1:war (default-war) @ teste —
[INFO]
Packaging webapp
[INFO]
Assembling webapp [teste]
in
[/Users/casmeiron/temp/vaadin/teste/target/teste-1.0-SNAPSHOT]
[INFO]
Processing war project
[INFO]
Copying webapp resources
[/Users/casmeiron/temp/vaadin/teste/src/main/webapp]
[INFO]
Webapp assembled in [2112 msecs]

[INFO]
Building war: /Users/casmeiron/temp/vaadin/teste/target/teste-1.0-SNAPSHOT.war
[INFO]
WEB-INF/web.xml already added, skipping
[INFO]

[INFO]
— maven-install-plugin:2.3.1:install (default-install) @ teste —
[INFO]
Installing /Users/casmeiron/temp/vaadin/teste/target/teste-1.0-SNAPSHOT.war to /Users/casmeiron/.m2/repository/teste/teste/1.0-SNAPSHOT/teste-1.0-SNAPSHOT.war
[INFO]
Installing /Users/casmeiron/temp/vaadin/teste/pom.xml to /Users/casmeiron/.m2/repository/teste/teste/1.0-SNAPSHOT/teste-1.0-SNAPSHOT.pom
[INFO]

[INFO]
BUILD SUCCESS
[INFO]

[INFO]
Total time: 2:02.758s
[INFO]
Finished at: Wed Apr 10 14:23:03 BRT 2013
[INFO]
Final Memory: 25M/341M
[INFO]

This is the output from building the widgetset (something I do in Liferay all the time).

If you don’t need to compile your own widgetset, I think you can get away with using the client-compiled jar, although I’m not sure how you’d affect the change to prevent maven from compiling it for you.

BTW, GWT is there with Vaadin 6 also (it also had an opportunity to compile your own widget set). I think the difference is the use of Maven and getting the POM set up correctly.

Thanks very much.
I’ve removed all dependencies that are not using the compiled version of the jar (like themes and client) and also I’ve removed the vaadin plugin (the one responsible for compiling the widgetset) now everything is like vaadin 6.
I will run the project into my glassfish to check whether everything is working.
Thanks in advance.

Dave’s correct. In this regard, Vaadin 7 is just like Vaadin 6, you don’t need to compile the widget set if you just use the precompiled version (i.e. core widgets). I think the Maven plugin is just being ignorant here and compiles it just in case.

I’d like to add that the Maven plugin is working exactly the same way as it (and the GWT plugin before it) always have. It has a hard time determining which changes might affect the client side, so it almost always recompiles it when there are changes in the project.

The difference you see is in the archetype, which now compiles the widgetset by default. You can move widgetset compilation under and then run the goals vaadin:update-widgetset and vaadin:compile manually when necessary to get control over it.

In the longer term, restructuring the archetype so that there is a separate module for the widgetset is the way to go when we have time to do that, but that will require a major rework of the archetype. The upcoming widget archetype already has a structure that is somewhat similar (though not the same) as the application archetype should have.