You are reading a single comment by @Micha and its replies. Click here to read the full conversation.
  • Edit: Sorry, it's the launcher that takes 2.3 seconds, not the reading of the file. Ignore this post! I'll try and optimize the launcher then.

    sooo I was thinking...
    If I want to go to settings or launch an app (which happens a lot) I always get a loading screen (twice!) and have to wait a while. (once for the launcher, once for the settings)

    I know, it is probably due to memory efficiency, but I don't think the launcher is big enough to justify an extra app (at least at bangle2)
    I didn't have a look at Bangle.showLauncher yet, but if we reset() and put the launcher functions right there without loading an extra file, this would speed up everything massively. (at least in my imagination)

    I know this is wrong, so I think I would just do a little hack for the non-public version of my watch:
    I'll compress the launcher.app.js a bit further (variable names etc) to get it to ~1KB and put it in a function that stops my timeouts and executes the launcher.... and also overwrites backbutton functionality to start my timeouts again.
    This would cut all my waiting time in half. :)

    Gordon said something that I didn't understand though:
    In my case it's 0.25s for widgets alone. I just tried and having the internal flash enabled drops that to 0.06s
    https://github.com/espruino/BangleApps/p­ull/1611#issuecomment-1078085876
    How could I "enable internal flash"? I'm not sure what that means. :D

    Any thoughts / opinions / help are welcome

    PS: I also tested the eval(require('Storage').read("launch.app­.js")) suggestion, but the loading time is still ~2.3 seconds.

About

Avatar for Micha @Micha started