Skip to content

perf(esp32): libstdc++ locale static init linked (~0.5 KB flash, 256 B RAM) #4798

Closed

Description

@zackees

Problem

Master ESP32 builds (Blink and APA102, esp32dev and S3) link libstdc++ locale static initialisation that 3.10.3 did not:

  • Flash (about 0.4–0.5 KB): _GLOBAL__sub_I__ZNSt12ctype_bynameIcEC2ERKSsj and …IwEC2… (215 B each), plus startup.* copies and cxx11-wlocale-inst (146 B).
  • RAM (256 B): time_get, numpunct and moneypunct guard variables.

Something in FastLED now references a std:: iostream, locale or string facility. The likely suspects are a <string>/<sstream>/<locale> include, or a std::to_string/std::function/exception path pulled in through #4774's no-throw work.

Task

  1. Find the reference from the S3/esp32dev master map (the chain into locale-inst.o).
  2. Replace it with the fl:: equivalent.

Acceptance

  • No locale-inst.o / wlocale-inst.o in the Blink map. About 0.5 KB flash and 256 B RAM recovered.

Data: https://fastled.github.io/dashboard/ (master 18669e6 vs 3.10.3, fbuild 2.5.38), symbol-level bloat reports linked from each dashboard point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: esp32priority: mediumtype: regression

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions