Repository navigation
refactor: Reduce string copies and allocations, start using std::ranges #559
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
288daa9
refactor: tighten string handling across the firmware
hhvrc 6986215
refactor: use std::ranges algorithms over iterator pairs
hhvrc 3f1d62b
docs(changes): add change file for zero-copy and ranges refactor
hhvrc 203f7f8
Merge develop into refactor/zero-copy-and-ranges
hhvrc 3f6b7f0
fix(portal): reject literal NULs and undecodable optional parameters
hhvrc 3841624
fix(ota): read the release version as an owned string
hhvrc 77504a8
fix(serial): print help in one write again
hhvrc 41cba70
fix(crypto): let Base64::Encode take input that views its output
hhvrc e9accf7
refactor: use plain strings on rare paths instead of hand-rolled stac…
hhvrc dd25590
refactor: take C strings where the callee only needs one
hhvrc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| kind: fixed | ||
| --- | ||
| Cut string copies and allocations across the firmware, and fix the issues found along the way | ||
|
|
||
| ## Release Note | ||
| Setup portal and WiFi fixes, less memory churn | ||
|
|
||
| A WiFi password too long for the setup portal is now rejected, instead of the network being saved as an open one. Network names from a WiFi scan are always read correctly, and the hub does less copying and allocating while it parses, builds and logs text. | ||
|
|
||
| - The setup portal reads query and form parameters in place, without a 256-byte limit | ||
| - Account link codes must be letters and digits before they are put into a request URL | ||
| - Network names copied from scan results are always terminated | ||
| - Saved WiFi credentials are looked up by id instead of being copied, and the portal's ready message no longer copies every saved password to list the network names | ||
| - JSON fields that are only parsed or compared are read in place, without a copy | ||
| - Firmware versions are printed and compared without building strings | ||
| - RF transmitter and LED task names fit FreeRTOS's 15-character limit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.