ESP32: Significant size increase with MICROPY_ROM_TEXT_COMPRESSION and external modules #17479
-
|
I do no know if this is a This is a reprise of #17225 which I prematurely marked as closed. If I compile a
When text compression is enabled, the I cannot figure out why this is happening- the scripts look okay (to me). I expect there is something that should be modified in the ulab/st7789 code to allow this compression to work correctly, but I am not sure if that is true. Note- the compression cannot be disabled without changing 'esp32_common.cmake I do not use cmake often but I expect the conditional should check for a defined variable, not just True/False. The build process I used was on |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Hi @ricksorensen - this seems like a real bug. Have you filed an issue about it? I tried searching but could not find. I believe I am experiencing the same in emlearn-micropython when using that with USER_C_MODULES on esp32 - the build with these modules added take an additional 300 kB - even though the code is just around 20 kB when built as .mpy files. Using -Os instead of -O2 seems to reduce the usage - however that will likely have negative effects on execution time, so not a good fix... As you mention in the previous discussion, this seems to be related to the MICROPY_ROM_TEXT_COMPRESSION function. I think it is being inlined many times, which causes immense bloating. |
Beta Was this translation helpful? Give feedback.
-
|
This has been reported in ulab - v923z/micropython-ulab#748 - which also links to #18880 |
Beta Was this translation helpful? Give feedback.
-
|
There seems to be a fix available in #18884 - can you test that @ricksorensen ? |
Beta Was this translation helpful? Give feedback.
I am currently compiling C3 and S3 xiao boards with full ULAB without modifying the
MICROPY_ROM_TEXT_COMPRESSIONsetting, sot the #18884 fix works for my appliication.For my work arounds on the XIAO C3 I had tried:
manifest.py. This worked at some loss of capabilityeNow I use the original
manfest.pywith my added fullulabandst7789modules withasyncioin manifest successfully.