View Full Version : Question about size of app.js in production - 790k?

18 Apr 2015, 8:53 AM

I've just been playing around with the beta, and was quite excited to compare it to Touch 2.4.

At the moment I am only interested in making a mobile app. I did a quick test by building the test scaffold app, then building a production version of the scaffold app using command.

The resulting app produces a folder with classic (desktop) and modern (mobile) folders in. The app.js size in the modern folder is 796k.

This doesn't seem much different to the file size of app.js using Sencha Touch 2.4 when using production. I would perhaps have thought by targeting the newer browsers and using CSS layouts for stuff the file size would have been smaller, or am I missing something? I noticed a new file in there, ext.js at only 300k, not sure about that one.

The .CSS file seemed fairly small, at 127k, but how would I change the default scaffold app to have, say the Cupertino theme or theme base? I tried changing it in the app.json but that didn't have any effect and I can't find the .css files inside the theme folders.

I guess my question is, is it possible to get the file size down any smaller for app.js if you are just targeting a mobile app?


21 Apr 2015, 2:23 AM
Currently, there isn't much difference between Sencha Touch 2.4 and Ext JS 6's modern toolkit. The big difference is now it actually physically shares the same core as Ext JS's classic toolkit.

When we merged the frameworks into Ext JS 6, you can think of it this way. The classic toolkit was Ext JS 5.1 and the modern toolkit was Sencha Touch 2.4. Plus some new stuff in there but at a very high level that's what it is.

22 Apr 2015, 11:41 PM
Thanks for the reply...I guess as time goes on there will be further optimisations :-)

When I open bootstrap.json I do see multiple entries that are not used in that scaffold app (production version), such as segmentedcontrol, loading spinner etc.

Does that mean they are included in that 796k file? Can I optimise further by removing the unused items from that bootstrap file?

796k is not bad but I'd like to reduce app.js down to 400 or 500k if possible then I should be able to keep the whole app under 1MB. That would be ideal.


23 Apr 2015, 1:35 AM
Does that mean they are included in that 796k file? Can I optimise further by removing the unused items from that bootstrap file?

Not necessarily. The bootstrap file is just a collection of the classes Cmd inspected.

3 May 2016, 9:28 AM
Hi, I need to compile a smaller app.js, only with the dependencies that my program uses. Is there any way to optimize the app.js size?Thanks!