Closed microbit-carlos closed 1 year ago
@riknoll any idea
@riknoll can you take a look at this? This came up from ElecFreaks accessory maker again.
sure thing
quick note: the 48kb number refers to binary.js size and not the compiled code size. To get an accurate number, you need to download the hex file and open the mbcodal.asm file that appears under the built folder. You can also add ?compiler=size to the url to get more detailed size information in that file.
Describe the bug
Breaking out this specific issue from:
Looking at the
binary.js
size numbers from this programme, the size difference between removing or including the[play sound]
block is ~48 KBs, which is quite a lot for something that would be mostly wrapping CODAL functionality.https://makecode.microbit.org/_bfs6mzETmeUi
To Reproduce
binary.js
file thetotal
value is166831
play sound
blockbinary.js
file thetotal
value is118995
Expected behavior A lower memory footprint for the block.
Screenshots N/A
micro:bit version (please complete the following information):
N/A
Desktop (please complete the following information): N/A
Smartphone (please complete the following information): N/A
Additional context
makecode.microbit.org version: 5.0.12 Microsoft MakeCode version: 8.0.7 microbit runtime version: v2.2.0-rc6 codal-microbit-v2 runtime version: v0.2.40