Well, I think the minification isn't the problem, rather that all components (wether you use them or not) are loaded from separate files. The hundreds of requests take time. When you build your app with sencha app build production
all (and only) the required components are concatenated into one big file that loads quite rapidly.
Have a look at the docs at Using Sencha Cmd with Sencha Touch that state
Sencha Cmd automates all optimizations for your application, including the following:
- Resolving dependencies required by the application and only including exactly what is used for optimal file size/performance.
- Enabling HTML5 application cache via automatic generation of "cache.manifest" and resources checksum.
- Minifying all JavaScript and CSS assets.
- Storing all JavaScript and CSS assets inside local storage on first load and patching them via delta updates between releases.
As a result, your production build can load instantly on subsequent access and updates on the fly with minimal network transfer.
Edit: There is a way to speed up development by changing sencha-touch.js
to sencha-touch-all.js
in your app.json file under "js"
. Next use the Sencha Touch Cmd command sencha app refresh
which updates your bootstrap.js file. Now all components are loaded from one single file. You need to change this back before building your app though, otherwise all components will end up in your build even the ones you are not using.