Build size. Auto Stripping or manual configuration


I made test of build sizes for empty project (Defold 1.2.80):

  • ios 5.3 Mb - great result;
  • android 2.7 Mb - one of the best result in all cross platform tools;
  • html5 - 4.9 Mb - very sad result.

Defold 1.2.103:

  • ios 5.9 Mb
  • android 2.9 Mb
  • html5 5.7 Mb

I work with html5-games portals, and main engines for this type of games are:

  • phaser 1500Kb full version, and 500Kb lite version without physics and some other modules;
  • cocos 2d js 1980Kb - full version and 424Kb lite version, and you can make your own custom built without some unused modules .

It’s very tiny engines and sometimes 5Mb is upper limit of whole game with all sources, sounds etc. For example you can see requirements of Spillgames (one of the biggest html5 games sponsor. They have several html5 portals)

I think, will be great to have new feature auto stripping or pre configurated with possibility turn off unneeded modules (like in cocos2djs).
It’s very useful not only for html5, but and for all other builds.
Defold all time add new features and in few years it can be big and clumsy engine like Unity. (I know many people who want turn off physics or some other things in they games on Unity)

Classic Solitaire Klondike
Is Defold can really make small size Android APK?
Teaser Fridays and Roadmap talks
Defold 1.2.89 has been released
DEFOLD vs Unity?
Native Extensions
How to optimize game for html5?
  1. [iOS] Is it 32bit or 32 + 64?
  2. [Android] Is it armv7 or FAT(armv7 + x86)?


I believe the HTML5 results you’re getting is without gzip? Most modern webservers will automatically gzip the engine when it’s requested, so you should take that into consideration.

// J


1. [iOS] Is it 32bit or 32 + 64?
lipo -info MyProject
Architectures in the fat file: MyProject are: armv7 arm64

2. [Android] Is it armv7 or FAT(armv7 + x86)?
as I can see in unpacked .apk it’s only armeabi-v7a


Yes, thank you. I know it.
But when I told about other html5 engines or about portals requirements - it’s all before gzip.
Hope you will think about possibility of manual or auto stripping.
It will be very useful feature for indie developers and generally for Defold engine, I am sure.


The same project. Size check with defold 1.2.81:

  • ios 5.5 Mb ( 1.2.80 < 1.2.81 on 0.2 Mb);
  • android 2.8 Mb (1.2.80 < 1.2.81 on 0.1 Mb);
  • html5 - 5.1 Mb ( 1.2.80 < 1.2.81 on 0.2Mb).

Today defold engine speed and size are main benefit. Hope that will remain in future.


We are looking into ways of removing unused code, as that is part of our ongoing efforts in optimising the build.
Unfortunately, I don’t have an ETA for you on that.

We are very committed to keeping the executable/package size small, and the performance great.

The current change in size is most likely our new feature of supporting WebP as a compression format (for textures), which allows you to save a LOT of size in your package, outweighing the gain in executable size.


Just for statistics 1.2.82 :

  • ios 5.6 Mb ( 1.2.81 < 1.2.82 on 0.1 Mb);
  • android 2.8 Mb (1.2.80 == 1.2.81);
  • html5 - 15.2 Mb :anger_right: ( something wrong, maybe some bug? release build option doesn’t work. and js minification doesn’t work)


Ouch, nice catch! We are looking into it.


Standard requirement html5 portals <5mb if it was possible and was available canvas, I’d love to make games on this engine


If I were making an HTML5 game portal I would upload the .js file of each engine version that any of the games use to a CDN with long caching, and then link to the appropriate engine version from any game which uses that engine version (and try to rebuild most apps to be on only the latest version). This would make your portal faster with load times as once the user download the engine and has it cached then their browser only needs to download the actual game data for each game and not the game engine over and over. If Defold games became more popular then this kind of practice would be a good idea no matter the engine size, and having the various engine versions hosted on cloudflare, google, and yahoo CDNs would be a good thing to try to get done too.


Yes, this is good point. Thanks. But this advice is only for your own portal.
But when we talk about sponsorship (when buying game licence) all this things are solved on the sponsor side.
And, as I told in my first post, they have some requirements and build size one of them (of course before zipping)
for ex (same requirements has many other portals)


@sven Is there any ETA for the HTML5 build fix? Or some workaround?



It will be solved for next beta which is mid next week (and then stable ofc, which is the Monday after that).

Could you for the time being use version 1.2.81?

Here are editor downloads for the previous version:
Linux (32bit)
Linux (64bit)


Traditional update for new version 1.2.83 :

ios 5.6 Mb ( 1.2.82 == 1.2.83, but +0.3Mb compared with 1.2.80);
android 2.8 Mb (1.2.82 == 1.2.83, but +0.1Mb compared with 1.2.80);
html5 - 5.3Mb ( 1.2.81 < 1.2.83 0.2 Mb , and +0.4Mb compared with 1.2.80);


Traditional update for new version 1.2.84 :nerd:
ios 5.6 Mb ( 1.2.83 == 1.2.84, but +0.3Mb compared with 1.2.80);
android 2.9 Mb (1.2.83 < 1.2.84 0.1Mb, but +0.2Mb compared with 1.2.80);
html5 - 5.3Mb ( 1.2.83 == 1.2.84, and +0.4Mb compared with 1.2.80);


Traditional update for new version 1.2.85 :nerd:
ios 5.6 Mb ( 1.2.84 == 1.2.85, but +0.3Mb compared with 1.2.80);
android 2.8Mb (1.2.84 > 1.2.85); :joy:
html5 - 5.3Mb ( 1.2.84 == 1.2.85, and +0.4Mb compared with 1.2.80);


:nerd: 1.2.86 :nerd:
ios 5.6 Mb ( 1.2.85 == 1.2.86, but +0.3Mb compared with 1.2.80);
android 2.9Mb (1.2.85 < 1.2.86 +0.1Mb, but +0.2Mb compared with 1.2.80);
html5 - 5.3Mb ( 1.2.85 == 1.2.86, and +0.4Mb compared with 1.2.80);

google table here


all the same as 1.2.86
google table here


Do you like stability? I like it! :smirk:
google doc link