Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Widgetset compilation takes forever in getPaintablesHavingWidgetAnnotation
I have to recompile (using the current Vaadin eclipse plugin) our widgetset because of an addon we like to use. Vaadin version is 6.7.3.
My problem is that the compilation takes forever, please see attached log file, currently 22% after 90 minutes :O
All jars are local, and the CPU usage is 5% and lots of memory free. As I understand the method is checking for a specific annotation in the classpath files, but why does this take sooo long? Any idea how to speed this up or what the problem might be?
getPaintablesHavingWidgetAnnotation should typically complete in a couple of seconds.
As the scanner loads every class on the classpath to check for the annotation, it will also trigger any static initialization done in the classes. I once had a similar problem when some of my classes were eagerly initialized singletons that attempted to load some stuff from a database. Because no database configuration was available on the classpath during the widgetset compile, it used some default values that caused the system to wait for a response from a database that was not running. In my case the database connection attempt timed out after 30 seconds, but this was then repeated for about 10 different classes, causing a delay of over 5 minutes.
I suspect you could have something similar going on during your compile. If you don't directly realize which classes might cause this, you'd need some way of getting a stracktrace from the compiler while it's running. This could be achieved either using jstack or by running the GWT compiler in a debugger instead of through the Vaadin plugin.