Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove temporary buffer in ConfigFile.ino #8298

Merged
merged 1 commit into from
Sep 16, 2021

Commits on Sep 16, 2021

  1. Remove temporary buffer in ConfigFile.ino

    When reading from a `Stream`, like `File`, using a temporary buffer is counterproductive because it complexifies the code and increases memory usage.
    It's also a source of confusion because it can create dangling pointers in the `JsonDocument`.
    The only benefit of using a buffer is the reading speed, but I don't think speed is the focus in this example; if it were, it would use a buffer in `saveConfig()` too.
    bblanchon committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    ada9fe9 View commit details
    Browse the repository at this point in the history