Improving the logging performance of esp-println
with async TX
#1843
Labels
package:esp-println
Issues related to the esp-println package
esp-println
with async TX
#1843
The current implementation of
esp-println
is blocking (which is totally reasonable) but the performance is not great as it blocks everything else in a critical region.In my project I designed an async version that TX in a separate embassy task. This improves the performance of logging 10x at least, and allows
esp-wifi
with TRACE enabled to run fast. The cost however is 0.5-2KB of a ring buffer that depends on your message size (withdefmt
this can be very small).I am thinking about porting this to
esp-println
. However currently this only works withembassy
so I need suggestions on how to achieve this without it.My implementation uses a custom halt function in
esp-backtrace
to ensure that the panic message is flushed to the USB serial JTAG in case of even catastrophic failure.My implementation lives in https://github.com/ProfFan/magic-loc-ng/blob/7280f7e4a6b0062bf56595aa8017f035fbcd316c/src/serial/mod.rs
The text was updated successfully, but these errors were encountered: