Improving loading performance of a gwt application with a smartgwt slider
I have a gwt application which uses the slider of smartgwt. However, it开发者_运维百科 takes 8 seconds to load the page (without cache) which is way to long.
So I used the Speed Tracer to analyze the problem and it looks like smartgwt is slowing down the loading performance.
When I look at the "Network Resources" Tab I see that it takes up to 5 seconds to load ISC_Core.js and ISC_Grids.js.
The application contains some sliders which are important and must be displayed from the beginning on.
Is there a way to improve the loading performance?
These files should be delivered compressed, at which point the size to download everything is ~600KB, and the first ever load will take however long is takes to download 600KB (generally much less than 8 seconds).
If you are using the slider only, you can avoid loading anything but Core+Forms. However we don't recommend adding SmartGWT to your project just to get a slider. SmartGWT is designed for complex, feature-rich enterprise applications, especially applications that will make good use of our very sophisticated grids, forms, calendars, charts, etc.
If you're not going to be using these other components and users might navigate away if your page is slow to load, then the tradeoff is not worth it and you should use a slider from some other framework. There's a SliderBar in the GWT Incubator that might work for you.
Use servlet filters to improve GWT+SmartGWT download speed.
I am using ResponseCacheFilter (https://code.google.com/p/webutilities/wiki/ResponseCacheFilter) and CompressionFilter (https://code.google.com/p/webutilities/wiki/CompressionFilter). Also, add CacheFilter (https://github.com/samaxes/javaee-cache-filter) to set browser caching for .js, .css and image resources.
So originally my site http://www.musikcat.com that built on GWT+SmartGWT took 7-8 seconds to load and after applying filters it takes 1-1,5 seconds...
精彩评论