Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
@JavaScript annotation loading performance
I am using the @JavaScript annotation to load javascript libs into my AbstractJavaScriptComponent, but when many libraries are included , the application takes a long time trying to load these javascript files
Is there a way to only load these js files once for the whole application not each time the UI loads ? or is there is another way to load these js files but with better performance ?
Hi,
Loading lots of various JS files is never a good idea, but you might try to add them to the original host page with BootstrapListener. This way they are loaded eagerly when to app starts instead of adding them dynamically when entering the view/component with the @JavaScript annotation.
If you just have lots of different JS files, you might try to combine them into one single file. This is one of the priciples of GWT to keep performance in control.
cheers,
matti