• @Geza, with exception of a few things, all you do in the left side of the IDE / Console, you can do on your application code, because all is js and it is executed (see REPL) by the Espruino JS interpreter on your MDBT42Q.

    I assume you 'cannot do it' because the things you try to throw out is at the times a very part of your application / communication while running / begin connected / having pending requests / responses.

    I do not expect a memory leak and therefore the HttpCC object (Array?) doe snot keep growing. Looks to me that individual elements come and go and grow and shrink over time.

    What you may look at is to cleanup received / sent data that is still lingering around even after the communication 'transaction' completed (until the next one is setup and replaces it).

    May be that with large amounts of data you can apply streaming as described here: https://www.espruino.com/Internet#transf­erring-large-amounts-of-data

  • @allObjects thank you for your thoughts.

    with exception of a few things, all you do in the left side of the IDE / Console, you can do on your application code, because all is js
    and it is executed (see REPL) by the Espruino JS interpreter on your
    MDBT42Q.

    I thought the same, but:

    function sethttp() {
      global["\xFF"].HttpCC=[];
    }
    

    The result:

    >sethttp()
    Uncaught SyntaxError: Got [ERASED] expected ID
     at line 1 col 8
    global.[ERASED]
                  ^
    in function "sethttp" called from line 1 col 9
    sethttp()
            ^
    

    WEB Ide's left side:

    
    >global["\xFF"].HttpCC=[];
    =[  ]
    

    I do not expect a memory leak and therefore the HttpCC object (Array?)
    doe snot keep growing. Looks to me that individual elements come and
    go and grow and shrink over time.

    Normally this is indeed the case, but sometimes it is not. I have attached a picture of memory usage. In case the memory decreased, the size of the HttpCC array increased.


    1 Attachment

    • Screenshot 2021-06-06 at 15.50.50.png
About

Avatar for Geza @Geza started