Hey folks,
I'm trying to add support for Instinct to the meditate app. It builds fine with the latest 4.1.1 SDK but crashes immediately with OOM (out of memory) when launching against a simulator.
Launching it against a different target (Fenix6) indicates that the app peaks at 106kb which is somewhat more than 92kb that are available on instinct2 (as far as I understand).
How would you go about reducing the memory foot print?
I naively thought that removing resources would be the first step but it doesn't appear to work:
The original prg size 254kb, see below:
-rw-r--r-- 1 dmitry staff 254780 31 Mar 15:38 Meditate.prg
After I remove a bunch of images totalling 16kb:
-rw-r--r-- 1 dmitry staff 4126 31 Mar 15:38 ./resources/fonts/fontAwesome/fontAwesomeFreeRegular_0.png
-rw-r--r-- 1 dmitry staff 7314 31 Mar 15:38 ./resources/fonts/fontAwesome/fontAwesomeFreeSolid_0.png
-rw-r--r-- 1 dmitry staff 3511 31 Mar 14:06 ./resources/fonts/meditateIcons/meditateIcons.png
-rw-r--r-- 1 dmitry staff 1207 31 Mar 14:06 ./resources/fonts/meditateIcons/yoga.png
The prg size is reduced by 5kb only:
-rw-r--r-- 1 dmitry staff 249852 31 Mar 15:41 Meditate.prg
I then remove fonts (~12kb):
-rw-r--r-- 1 dmitry staff 1649 31 Mar 13:43 ./Meditate/resources/fonts/roboto/roboto46Bold.fnt
-rw-r--r-- 1 dmitry staff 2490 31 Mar 15:38 ./StatusIconFonts/resources/fonts/fontAwesome/fontAwesomeFreeRegular.fnt
-rw-r--r-- 1 dmitry staff 5678 31 Mar 15:38 ./StatusIconFonts/resources/fonts/fontAwesome/fontAwesomeFreeSolid.fnt
-rw-r--r-- 1 dmitry staff 1199 31 Mar 14:06 ./StatusIconFonts/resources/fonts/meditateIcons/meditateIcons.fnt
and the prg only drops 2kb:
-rw-r--r-- 1 dmitry staff 247532 31 Mar 15:44 Meditate.prg
Now, when I launch the app in the sim, it's at 96kb. And crushes immediately I'm assuming because I hacked away a bunch of resources.
Anyway TLDR:
1. App at peak is 106kb
2. I remove 28kb worth of stuff.
3. App at peak is 96kb now.
How would you suggest I go about reducing the app size so it works on Instincts?