You are reading a single comment by @JumJum and its replies. Click here to read the full conversation.
  • @Kolban the guys from nodemcu had the same problem and fixed it. Heap doubled from one day to the other.
    @Gordon source is available here http://jumspruino.jumware.com/sources/SH­A1.js.
    I did some (crazy) things to reduce memory and speed, which did not make it easier to read:

    • use typed arrays
    • remove temporary values
    • replace switch by if...elseif...
    • removed functions and added code inline
    • reuse local vars
    • converted multiplication(like *4, *32,..) to shift
    • removed a "funny" encode64 and use btoa instead
    • moved functions to be local
      All together my plan is to use ESP8266 for web, and let Espruino boards do the hard work.
About

Avatar for JumJum @JumJum started