elesp_log killing performance
Posted: Wed Sep 20, 2023 10:48 am
esp-ids 5.1.1 user here with esp32-wroom dev board.
I have some code with timer and peripherial interrupts. the ISR routines send to the queue, and a task receives from the queue and processes the events. normally i’m seeing 50 usec delay between interrupt handler and task getting unblocked for event processing. if i use some logging (esp_log) in the task handler then this delay skyrockets up to 25 millis depending on the amount of logging. the logger is printing to UART
what’s the problem with esp_log component? does it have longish noInterrupt sections internally? is there any way to keep this delay under control? i need some logging for development, but i can’t develop with such poor logging performance (unless i’m doing something wrong)
in the past i had my own logger where lines were stored in a buffer and later printed to UART in low priority task, and with all the mutexes the performance was much better..
I have some code with timer and peripherial interrupts. the ISR routines send to the queue, and a task receives from the queue and processes the events. normally i’m seeing 50 usec delay between interrupt handler and task getting unblocked for event processing. if i use some logging (esp_log) in the task handler then this delay skyrockets up to 25 millis depending on the amount of logging. the logger is printing to UART
what’s the problem with esp_log component? does it have longish noInterrupt sections internally? is there any way to keep this delay under control? i need some logging for development, but i can’t develop with such poor logging performance (unless i’m doing something wrong)
in the past i had my own logger where lines were stored in a buffer and later printed to UART in low priority task, and with all the mutexes the performance was much better..