Deploying Sencha Touch Application

Go To StackoverFlow.com

4

I'm about to deploy my application to my production server but have noticed that on my iPhone the loading of the application is quite slow.

I think it might have something to do with the 2.5Mb js file that needs to be loaded.

Is there a way to minimise the "sencha-touch-all-compat.js" file to only include what you are using?

2012-04-04 00:36
by griegs
Do you use sencha cmd for building you application? It gives me 465kB app.js file when I make production build of start project, also created by sencha cmd - kio21 2013-08-28 18:08
Make use of Offline Storage - surhidamatya 2013-08-29 06:37


2

I had this same problem - the Sencha way of doing things is to generate an app.js that's got everything in there: all the Ext.* classes you need, plus your code, suitably minified. But sometimes you just want to keep everything the same and just replace the existing sencha-touch-all-debug.js with a minified version containing only the stuff you use.

After some experimentation (and running sencha app build with debug logging to see what it does) I found the following recipe:

sencha compile --options=debug:false,logger:no,minVersion:3,product:touch union --recursive --file=app.js and exclude -namespace MyApp and concat -yui sencha-touch-depends.js

Which will produce a sencha-touch-depends.js that you can use to replace sencha-touch-all-debug.js or whatever. Leave off the -yui if you want to see what it's doing.

2013-09-04 22:39
by Jeff Trull
great. next time i'm using sencha i'll bear this in mind, thank - griegs 2013-09-23 05:03
Ads