Feasibility of de-Stringing a library

For example, GitHub - electric-sheep-co/arduino-redis: A Redis client library for Arduino.

This uses Strings in many places. Do you think it would it be quicker to rewrite the library from scratch, or attempt to surgically replace the Strings with char arrays?

That has worked for me, and is pretty easy with snprintf().

I suspect that the need for de-Stringing is a lot less for the ESP8266 and the ESP32 than it is for AVR based microcontrollers. The ESP8266 and ESP32 have a lot more memory so the effects of memory fragmentation are a lot less or don't happen.
If you have 2k memory (e.g. Uno) and e.g. 1k is wasted due to fragmentation, you can easily have an issue. That same 1k on an ESP8266 or ESP32 will not have an impact.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.