| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add a lazy query-string encoder that mirrors the existing path encoder fast path. When a query contains only pass-through characters, UriEncoder now reuses the original String instead of allocating a pooled StringBuilder and an equal replacement String. The append-based path is unchanged for URLs with additional query params. Existing escaping behavior is preserved for queries that need percent-encoding. Codex on behalf of Pavel Ptashyts Co-Authored-By: Codex <codex@openai.com>
The lazy query encoder is an implementation detail used only by UriEncoder and same-package tests. Publishing it would expand the supported API without a caller-facing requirement. Keep the allocation optimization while limiting the helper to its package. Codex on behalf of Pavel Ptashyts Co-Authored-By: Codex <codex@openai.com>
Co-authored-by: Aayush Atharva <24762260+hyperxpro@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Summary
Rationale
UriEncoder already reuses the original Uri when encoding produces equal path and query values, but the existing query path still allocated a StringBuilder and replacement String for clean queries. The new helper mirrors the path encoder's lazy behavior and avoids that temporary allocation in the common already-encoded REST query case.
Validation
Attribution
Codex on behalf of Pavel Ptashyts