Sencha is too slow

I introduced the Sencha grid in one of my JSPs. Locally sencha is pretty fast, but on an external server it is too slow. I followed the posting instructions here

http://docs.sencha.com/ext-js/4-0/#!/guide/getting_started

using ext-debug.js and my app.js. Then in my JSP I imported app-all.js (670KB) and ext.js

Chrome network tab

Where am I mistaken? Thanks

+4
source share
2 answers

app-all.js is 670KB, which is a very large file. You must reorganize, optimize, and minimize the code so that it is smaller. You can even split into multiple files per class or implementation and do js dynamic loading (but this will take longer). A good target will be as small as ext.js.

Also, if you have access to your web server (e.g. Apache / Tomcat), you can enable gz compression to compress the files before sending them to browsers. Also pay attention to other web server optimizations.

(By the way, your question is more like a problem with a web server, rather than a problem related to sencha).

+2
source

Another way to improve the loading time of your application is to make sure that the browser ext.js and app-all.js are cached. Thus, when you first load the application, it will be slow, but the following loads will be faster.

Look at cache control, expire and other HTTP cache control headers ( this seems to be a good explanation). Your server should generate these headers when sending files that you want to cache.

The real problem, as can be seen from the timeline, is a slow connection to the server (10 seconds downloading 206/665 Kbytes for most connections is slow), so you should see if there are any other server problems causing slowness.

0
source

All Articles