Memory requirement of Thunkable X applications

I just found out something rather surprising.

I have this lavish application in Classic Thunkable; it is making use of nearly all the features and components, some of which are still not available in X (canvas for instance), has 5 screens, over 7000 (not a typo, I do mean over seven thousand) blocks, has 13 media files, hundreds of components, etc etc. The resulting .apk file is 4.57 MB. Once installed, the app occupies 25.09 MB in internal storage in one of my device (another reports 16.32 MB, go figure why it is lessā€¦)

On the other hand, there is a user who just posted a question ā€œwhy is my app failing?ā€, which is a VERY simple app (2 screens, 163 blocks, 25 components; nothing fancy, it is just a test app), but the .apk is 19.6 MB and once installed, it takes 77.99 MB of internal storage !

My question is ā€œwhyā€?
Is that something that has been observed or reported before?

Why is an X app that does virtually nothing ends up taking 3+ times the memory of something that does everything, including helping you computing the volume of your kitchen sink, based on Classic?

Can anyone else validate that the same functional app is taking so much more memory, having much larger .apk files when written in X than in Classic?
Can anyone also validate that the iOS files in X (for the same app) are comparable in size to the corresponding .apk for the Android side (I do not have an iOS device, so cannot validate that, as far as I can tell)?

1 Like

Hi there!
I have also experienced thisā€¦
When I was building an app for helping a fellow community member, It consisted of just a screen with one label on it & all whitespace; nothing else. The blocks were only 4 :

  • screen1 opens
  • spreadsheet1 get cell,
  • set label text to value.

Still the app was 19MB Largeā€¦ :face_with_raised_eyebrow: Why?

That means the infrastructure, all those little widgets and drivers, the things that define how a button click starts an event, how a list view displays its components, occupy 19 M by themselves, yet the equivalent for Classic would be at most 4 M.

Now, it is possible that a lot of the drivers in Classic are borrowed from the Android system, and are therefore shared, while X insist in including all that luggage. Is that because they do not want to be affected by any incompatibility with the iOS, and that each app is essentially coming with their own chunk of the OS? And that each app is loaded with the drivers for components that the app is not even using?

1 Like

:sweat_smile:

Next time,try to just one screen and done.
See whether is it large size or not.

1 Like

I just did try this: a ā€˜newā€™ project, named ā€˜blankā€™ that contains absolutely nothing but an empty screen1, no blocks, no logic no asset files.

Download this, and the .apk file is 19 MB ( 19,936,764 bytes). And it takes 48.37 MB of internal storage.
For nothing.
Can anyone validate how much room the same thing takes on an iOS device?

1 Like

Will the captured large size is for Thunkable built-in setting.

1 Like

That is my point. A very complicated app (check mine https://play.google.com/store/apps/details?id=com.vgoudreault.Polyunit, I mean it is a calculator with units, that means every little function has to be programmed) in Classic has an apk file that is less than 5 MB.
A completely blank Classic ā€˜projectā€™ returns an .apk that weights in at 3.4 MB.

What I wonder is what is in the extra 15.6 MB that is needed in X.

1 Like

strangeā€¦

Hi there,

I do not know how much the application for iOS weighs, but you can easily see that it weighs so much in apk. To do this, rename the apk extension to zip and look at the archive.

We already know how big the apk is.
It is the size for iOS that we donā€™t know.

The size of the application on the link 95 Mb

https://x.thunkable.com/projects/5cd84f23e3097f3353fdad45/project/properties/designer/

I will write the size of the empty application later.

The size of the empty app on iOS is 85.1 Mb (App Size - 83.3 Mb, Documants & Data - 1.9 Mb)

1 Like

That is the footprint of the app once installed, correct?
That is essentially double the taken in Android for the same empty app.

I think that this is excessive.
And not only comparing an iOS implementation with an Android, but also comparing X with Classic.

A major effort in optimisation seems to be in order, or else X apps will be seen as memory hogs. That will hurt us all.

That is the footprint of the app once installed, correct?
Yes

I have information that there is a 100 MB limit for wireless downloads. If so, then we may have problems creating large applications.

This is interesting, It seems that the X platform is built ā€œheavier.ā€ Meaning that each compiled app file probably contains libraries and dependencies that are imported with the X app.

1 Like

Youā€™re all correct that the apps that we create are somewhat larger than they need to be, especially for very simple apps. We could definitely do more of what they call ā€œtree shakingā€, i.e. making sure that we remove (or donā€™t include) code for capabilities that arenā€™t being used by a particular app. Thatā€™s one of the things that Classic does a better job at than āœ•. Weā€™ll get around to working on that at some point.

FWIW, Iā€™ve compiled some data based on a minimal app named Foo (one button, one label and a couple of blocks).

Here are the sizes of downloaded files:
Foo.apk - 19.9 MB - For Android
Foo.ipa - 29.8 MB - For iOS

Here are the sizes of the installed app on the device:
Foo - 54.71 MB - For Android
Foo - 84 MB - For iOS

As I mentioned above, these are all on the large-ish size, of course, for an app that doesnā€™t do very much, but none of those sizes are way out of line with many other apps that I have installed, so I think in absolute terms itā€™s not that bad.

While Iā€™m talking about this, I might as well warn you that adding 64-bit support for Android (as required by Google Play) will add about 8MB to the APK file size.

-Mark

2 Likes

I see you are selling it for 2.39ā‚¬;do you think itā€™s a good move now that we can find many many apps for free?

Can you implement free features and pro features maybe?

You might make a simpler app, without the more advanced features so people can try it and sell the complete version maybe?

?? I do have a free version as well:

I did not mention it because, despite having a bit less features, the AdMob elements add at least 1 M, increasing the size of the .apk from 4685 KB to 5928 KB, which I cannot really fault Thunkable for.

1 Like