-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
perf(util): avoid extra copy when base64 encoding #2805
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
Conversation
seanmonstar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Though I think it will still copy, because the type passed is a Vec, and that constructor only doesn't copy if passed a Bytes.
It probably needs a Bytes::from(Vec) call in between.
|
Ah, I really overlooked that condition. I misread the implementation of if_downcast_into in from_maybe_shared. I thought it would convert owned types like Vec into Bytes. |
|
OK, I’ve corrected it by wrapping it in |
Bumps reqwest from 0.12.23 to 0.12.24. Release notes Sourced from reqwest's releases. v0.12.24 Highlights Refactor cookie handling to an internal middleware. Refactor internal random generator. Refactor base64 encoding to reduce a copy. Documentation updates. What's Changed build(deps): silence unused deps in WASM build by @0x676e67 in seanmonstar/reqwest#2799 perf(util): avoid extra copy when base64 encoding by @0x676e67 in seanmonstar/reqwest#2805 docs: fix method name in changelog entry by @johannespfrang in seanmonstar/reqwest#2807 chore: Align the name usage of TotalTimeout by @Xuanwo in seanmonstar/reqwest#2657 refactor(cookie): add CookieService by @linyihai in seanmonstar/reqwest#2787 Fixes typo in retry max_retries_per_request doc comment re 2813 by @dmackinn in seanmonstar/reqwest#2824 test(multipart): fix build failure with no-default-features by @0x676e67 in seanmonstar/reqwest#2801 refactor(cookie): avoid duplicate cookie insertion by @0x676e67 in seanmonstar/reqwest#2834 New Contributors @johannespfrang made their first contribution in seanmonstar/reqwest#2807 @dmackinn made their first contribution in seanmonstar/reqwest#2824 Full Changelog: seanmonstar/reqwest@v0.12.23...v0.12.24 Changelog Sourced from reqwest's changelog. v0.12.24 Refactor cookie handling to an internal middleware. Refactor internal random generator. Refactor base64 encoding to reduce a copy. Documentation updates. Commits b126ca4 v0.12.24 4023493 refactor: change fast_random from xorshift to siphash a counter fd61bc9 refactor(cookie): avoid duplicate cookie insertion (#2834) 0bfa526 test(multipart): fix build failure with no-default-features (#2801) 994b8a0 docs: typo in retry max_retries_per_request (#2824) da0702b refactor(cookie): de-duplicate cookie support as CookieService middleware (... 7ebddea chore: align internal name usage of TotalTimeout (#2657) b540a4e chore(readme): use correct CI status badge e4550c4 docs: fix method name in changelog entry (#2807) f4694a2 perf(util): avoid extra copy when base64 encoding (#2805) Additional commits viewable in compare view Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase. Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: @dependabot rebase will rebase this PR @dependabot recreate will recreate this PR, overwriting any edits that have been made to it @dependabot merge will merge this PR after your CI passes on it @dependabot squash and merge will squash and merge this PR after your CI passes on it @dependabot cancel merge will cancel a previously requested merge and block automerging @dependabot reopen will reopen this PR if it is closed @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
No description provided.