Post
by Roberthh » Fri Apr 24, 2020 6:20 pm
The size of the code that can be imported and executed depends on the size of the heap, and of the code structure. My personal rule of thumb is 10 lines of code/kByte heap. So for a 8266 with about 25k heap space it is ~250 lines. For a ESP32 with SPIRAM and it's 4 MB heap it's ~40.000 lines. You can play a little bit with lazy imports to push that number up. But the better effects on RAM usage are:
a) using pre-compiled code, where the compile is done on your PC, and even better
b) using frozen bytecode, where the compile is done on your PC and the code is stored in flash.