Page 2 of 2

Re: Running webserver and other code simultaneously

Posted: Tue Jun 05, 2018 6:55 am
by pythoncoder
You can indeed precompile code with mpy-cross and copy the .mpy file into your filesystem. This works fine but is something I seldom use because all it saves on the target is the compilation phase. It doesn't save RAM at runtime. Its main use is where you have a module which is too large to compile on the target but not too large to run without freezing. I've used it then because the turn-round time is much faster than the compile-link-flash cycle for frozen bytecode.

It can also save time if you have a module you want to run as soon as possible after boot, but this is rather a niche situation.