WebAssembly / WebAssembly/WASI

Consider optimizations to reduce the number of host calls

Open
#823 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-http S-inactive
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

While host calls are pretty fast these days, it's still useful to consider optimizations to reduce their number per request for really low-latency scenarios. This has come up in two areas so far:

  • @PiotrSikora mentioned in this comment that many requests have empty bodies, so perhaps consume could short-circuit the hop through incoming-stream, maybe with a variant like this.
  • @BrendandBurns mentioned in this comment the sequence of calls to create headers, then create a response, then make the request. Perhaps we could have some more one-shot options that do multiple of these at once.

Both seem like potentially good ideas to me but I'd be happy to hear more thoughts.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked PR #3 discussions and trace the consume/incoming-stream path, along with the sequence that creates headers, creates a response, and makes the request. Define which host-call reductions are viable for empty bodies and one-shot request setup, then document and test the agreed API changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
api, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.