• as it is unknown what the minification process can compress down towards

    It's not minification - there is actually proper file compression inside Espruino that takes the contents of RAM and squeezes it (reversibly) into Flash.

    To be honest on most ESP8266 parts you have bags of free flash. There's absolutely no need for the 12k restriction but I think it's been left in to be compatible with the 512k ESP01 parts.

    Curious why function comments are preserved during save()

    Espruino keeps the code you uploaded so that you can edit it on/recover it from the device if you need to. Otherwise it'd make more sense to just pre-compile everything.

    If you want comments removed, turn on minification in the Web IDE and they'll get ripped out before even being sent to the device.

    Not finding the true end-of-comment kept piling up chars as code, eventually exceeding the available space required for the save.

    I would be a bit dubious about this - Espruino's been in use a lot and I'd be surprised if a bug like that still existed. If you get some code that exhibits the behaviour post it up and I'll check it out.

  • If you get some code that exhibits the behaviour post it up and I'll check it out.

    @Gordon,

    Although I wasn't able to duplicate the 500+ byte save() increases that occurred when deleting 4K chunks of source, I was able to capture a 248 byte increase example.

    In order not to muddy this thread with massive source code image blocks, I'm providing it here in five files.

    Increase occurs between file PASS1 and PASS2 after the removal of both internal comments and wrapper functions.

    Although this is of low priority, one might find some devious gotcha's lurking about. Would love to hear your findings, even if by email.

    Robin

About

Avatar for Gordon @Gordon started