Thank you, @Ronald!
I switched to Version 14.0.1 and tried the base starter project with Spring Boot from Vaadin.com as example (download and start as-it-is).
Spoiler: I don’t see any improvement in starting performance compared to 14.0.0.
First time spring-boot:run:
2019-08-21 11:54:54.832 INFO 4120 --- [ restartedMain]
a.e.evaluation.spring.Application : Started Application in 269.661 seconds (JVM running for 270.109)
OK, much too long, but includes also the whole “npm install” command for the frontend packages.
second time spring-boot:run:
----------------- Frontend compiled successfully. -----------------
...
Started Application in 12.904 seconds (JVM running for 13.354)
Yes, much faster than at the first time, even though the frontend compilation with webpack is there while I never changed anything, nor in Java code or the frontend.
But then, there is no way to get it faster.
It will take around 13 seconds every time I redo spring-boot:run.
It’s getting much worse when I want to start/debug the application as it is just using the IntelliJ’s “run” command (starting the Application main class…).
This seems to do the same if you look at the console, but every time takes around 32 seconds, and is slow the same every following run / stop and rerun command.
What now I see clearly: There is a really long time gap here between these two log entries in the console:
2019-08-21 13:57:20.377 INFO 11092 --- [ restartedMain]
o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 912 ms
2019-08-21 13:57:44.276 INFO 11092 --- [ restartedMain]
c.v.f.server.startup.DevModeInitializer : Starting dev-mode updaters in C:\development\workspace\local\Java\Vaadin14SpringBootBase folder.
So it seems that in this case it’s not the time that webpack needs for the frontend compilation, but something else is going on at this stage that takes about 24(!) seconds (and about 5 seconds in the case I use the spring-boot:run maven goal).
Well, setting vaadin.whitelisted-packages to the “root” package of the base starter (like mentioned earlier in this thread) really helps in avoiding this time gap - but you have to really reinitialize the whole project, delete all generated files including the npm packages etc. to let the application work properly afterwards.
Doing this, also starting the application the “normal” way the IDE does, in my case I come down to about 13.5 seconds, and sometimes to “just” about 9 seconds for spring-boot:run - which, unfortunately, for some unknown reason I can not use for debugging.
Of course, you can make development easier by switching on hot swap while changing Java code, but you know, hot swap in Spring is not possible on every change.
So it will quite often come to the moment you would have to wait at least 13 seconds (in my case, maybe having a slow PC) to restart the application after a change in the IDE!
That was much faster with Vaadin 13…
P.S.: Maybe we should change this thread’s title to “Starting spring boot app with Vaadin Flow 14 is very slow”