Skip to content

[wasm] Reduce allocation when options are passed to fetch #74142

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 1 commit into from
Aug 19, 2022

Conversation

maraf
Copy link
Member

@maraf maraf commented Aug 18, 2022

We can skip creating a list of options and than converting to array, because we can calculate in advance number of options being used in the HTTP call.

Note: The same doesn't apply for headers, because we don't know number of values for each header.

@maraf maraf added arch-wasm WebAssembly architecture area-System.Net.Http labels Aug 18, 2022
@maraf maraf requested review from lewing and pavelsavara August 18, 2022 10:32
@maraf maraf self-assigned this Aug 18, 2022
@ghost
Copy link

ghost commented Aug 18, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

We can skip creating a list of options and than converting to array, because we can calculate in advance number of options being used in the HTTP call.

Note: The same doesn't apply for headers, because we don't know number of values for each header.

Author: maraf
Assignees: maraf
Labels:

arch-wasm, area-System.Net.Http

Milestone: -

@maraf
Copy link
Member Author

maraf commented Aug 18, 2022

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@maraf maraf merged commit a820ee3 into dotnet:main Aug 19, 2022
@maraf maraf deleted the WasmHttpReduceAllocations branch August 19, 2022 09:34
@maraf
Copy link
Member Author

maraf commented Aug 19, 2022

/backport to release/7.0-rc1

@github-actions
Copy link
Contributor

Started backporting to release/7.0-rc1: https://github.com/dotnet/runtime/actions/runs/2888490989

@karelz karelz added this to the 8.0.0 milestone Aug 22, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Net.Http
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants