Improves loading time of your application by optimizing the widget set
The Vaadin default widget set loads almost all available components immediately when the application is started. This tool can help you improve the startup time of your application significantly by reducing the number of components which are initially loaded!
Widget Set Optimizer analyzes the components you are using on your login screen, initial view or in your whole application. Based on the analysis an optimized widget set file is generated, ensuring only the widgets you are actually using are sent to the end user.
- Add the jar to your project and recompile your widget set
- Add "new WidgetSetOptimizer().extend(this);" to your UI init method
- Open the application in debug mode (?debug url parameter) and click the "OWS" button in the debug console.
- Check your server log and follow the instructions.
Widget Set Optimizer will include all widgets which have been used when the "OWS" button is pushed. If you push it directly after the initial load, you will include the widgets needed for the initial view. If you navigate in your application before pressing it, you will include all widgets used in any of the views you have visited.
The unused widgets will be set to be loaded immediately when the initial view has been shown (deferred), typically while the user is performing login or similar. operations. If you have clicked through your entire application, change the default to LAZY and the unused widgets will never be loaded (unless they are used on some view).
If you only want to get a list of used widgets (connectors), press the "SU" button in the debug window.