eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

Investigate possibility to speed-up GWT Super DevMode launching #7122

Closed azatsarynnyy closed 6 years ago

azatsarynnyy commented 7 years ago

gwt:codeserver Mojo forks process-classes build phase for each project from the maven reactor in order to prepare/ensure all required projects are prepared for running GWT Super DevMode. E.g. all (re-)sources have been generated etc.

Since we never (AFAIK) launch GWT Super DevMode on freshly cloned Che sources but built it first, forking process-classes build phase looks redundant and it takes a lot of time.

So it makes sense to investigate the possibility to skip process-classes build phase execution on every project during launching GWT SDM.

azatsarynnyy commented 6 years ago

There are a couple of ways available to speed-up launching GWT Super DevMode.

  1. Skip process-classes phase when running gwt:codeserver.
  2. Skip all maven plugins' goals which are executed up until the process-classes phase and doing unnecessary work.

Solution №1 requires a contribution to the gwt-maven-plugin or extending it in our own maven plugin. Solution №2 requires just passing the several additional properties to the command line for launching SDM. Most of the maven plugins' goals already have such parameter - skip. We just need to add the same one for the che-core-api-dto-maven-plugin.

Now SDM runs in >3min. Solution №1 will allow launching SDM in ~11 sec. Solution №2 will allow launching SDM in ~ 1m.

Thus, it will be more reasonable to apply solution №2.

slemeur commented 6 years ago

Solution 1 seems more interesting. Why not starting with n°2 but still trying to reach the best solution by contributing back to another project?

azatsarynnyy commented 6 years ago

Hi Stévan! @slemeur I agree with you. Solution 1 also is much more interesting for me as it's an opportunity to make a contribution back. But not in this case. I had a short discussion with the plugin's owner (Thomas Broyer) and we came to the opinion that the solution I've proposed is actually a workaround from the plugin's architecture point of view. And saving extra 40-50 sec. in SDM launch it is not a valid reason to add such workaround to the plugin. While we can save ~2 min. solving the problem in the "right way". Anyway, I have several other small ideas for contributing to that project :wink:

slemeur commented 6 years ago

Excellent ! Thanks Artem !