Skip to content

Frozen modules best practice question #16574

Answered by robert-hh
Baker68 asked this question in ESP32
Discussion options

You must be logged in to vote

My question would be, what is more important for you. Boot-up time or execution speed.
As you found out yourself, loading code from frozen bytecode is fast. It should not matter much, whether it's few large files for many smaller ones, since the code is not loaded to RAM. With mayn small files, a little more time is spent for directory searches. The only was I see to speed up boot time is lazy importing: import a script not before you need it.

There might be a difference in execution speed. Frozen bytecode stays in flash memory. Since the flash is serially attached, the code is download block-by-block to RAM during execution. To speed up that process, there is a cache. There will be cache…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Baker68
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ESP32
Labels
None yet
2 participants