You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Refactor AsyncFileResponse: remove String _path
This refactor eliminates the private String _path member from the AsyncFileResponse class, replacing its functionality with a fixed-size char gzPath[MAX_PATH] buffer insife of function.
The use of Arduino's dynamic String class has known drawbacks in memory-constrained or real-time systems, particularly due to heap fragmentation and unpredictable allocation behavior. By switching to a statically allocated C-style buffer, the implementation now benefits from improved memory determinism, reduced fragmentation risk, and overall lower memory overhead.
In addition to reducing memory fragmentation and improving stability in embedded environments, this change also yields better execution speed.
This change maintains behavioral equivalence.
* Change for use arduino String
* Implemented @mathieucarbou's suggestion
Thank you very much for indicating compatibility with other devices.
* Add files via upload
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/WebResponses.cpp
* ci(pre-commit): Apply automatic fixes
---------
Co-authored-by: Mathieu Carbou <mathieu.carbou@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
0 commit comments