The actual garbage collect should be pretty quick (2ms or so) so I'm not 100% sure that's the issue.
It is possible that if you're removing the buffer then trying to reallocate it's unable to find a contiguous block of memory any more and has to defragment though.
That's a lot more efficient with memory than blindly loading all apps into memory as it only keeps the data that's needed for the launcher. The JSON contains a lot of stuff (eg lists of files) that's not needed and would just eat up RAM.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The actual garbage collect should be pretty quick (2ms or so) so I'm not 100% sure that's the issue.
It is possible that if you're removing the buffer then trying to reallocate it's unable to find a contiguous block of memory any more and has to defragment though.
Are you using the same code to load the apps as here: https://github.com/espruino/BangleApps/blob/master/apps/launch/app.js#L2
That's a lot more efficient with memory than blindly loading all apps into memory as it only keeps the data that's needed for the launcher. The JSON contains a lot of stuff (eg lists of files) that's not needed and would just eat up RAM.