Copy ESP8266 String w/SSO to ESP32 repo (#2715)
I redid the ESP8266 WString library to enable small string optimization (SSO) a while back, and think it would be helpful even on the ESP32 with its higher memory complement. SSO avoids lots of tiny mallocs() on the heap which cause fragmentation by using the memory in the class object itself to store the actual string and only mallocing() for buffers that are larger than what can fit in thie class object. Modern C++ std::string implementations have this optimization as well, but since we're using Arduino strings we had to roll our own.
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment