I'm using this library inside an ESP32 freeRTOS project and found that the simple fact of doing a modem.begin() was making everything else (in other running tasks) to go much slower.
Following the code, I got to IridiumSBD::waitForATResponse(), where the loop continually checks for input from the modem until:
- a response has been received.
- the timeout has expired.
- the request is cancelled.
This loop does not have any delay() in it, so while not noticeable in single-threaded apps, it will eat all available CPU in multi-threaded apps.
I've tested by adding this here and it seems to work:
for (unsigned long start=millis(); millis() - start < 1000UL * atTimeout;)
{
// ...
while (filteredavailable() > 0)
{
// ...
} // while (filteredavailable() > 0)
// [ADDED CODE: BEGIN]
delay(10);
// [ADDED CODE: END]
} // timer loop