Skip to content

perf: drop/de-allocate req body str explicitly after parsing#2165

Draft
chenba wants to merge 1 commit intomasterfrom
perf/drop-body
Draft

perf: drop/de-allocate req body str explicitly after parsing#2165
chenba wants to merge 1 commit intomasterfrom
perf/drop-body

Conversation

@chenba
Copy link
Copy Markdown
Collaborator

@chenba chenba commented Mar 26, 2026

In the BsoBodies::from_request extractor, the request body string is dropped at the end of its scope. But it can be explicitly dropped once it's no longer needed.

Low risk so seems worth trying.

In the BsoBodies::from_request extractor, the request body string is
dropped at the end of its scope.  But it can be explicitly dropped once
it's no longer needed.
@chenba
Copy link
Copy Markdown
Collaborator Author

chenba commented Mar 27, 2026

@pjenvey what do you think? Low risk enough to just try it?

@pjenvey
Copy link
Copy Markdown
Member

pjenvey commented Mar 27, 2026

@pjenvey what do you think? Low risk enough to just try it?

Yea, definitely. It might be worth refactoring this extractor to use an async block first (or afterwards is ok), then you might be able to easily add a new scope (nested { } block) to do it instead of drop. I thought we had converted all extractors to async/await for #544 but maybe I was wrong..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants