Skip to content

Consider optimizations to reduce the number of host calls #823

Closed

Description

@lukewagner

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.

Activity

  1. brendandburns commented on Mar 5, 2023

    @brendandburns
    Contributor

    fwiw, part of the motivation to reduce host calls is also to improve the security of the surface area. I believe it is easier to ensure the security of a single req(...) style call vs all of the memory manipulation of the various calls between guest and host.

    It's also a cleaner abstraction for the implementor, so fewer bugs in the implementation.

  2. added
    S-inactiveStatus: no discussion in over a year. Records silence during triage; not a proposal to close.
    on Aug 20, 2026
  3. sw17ch commented on Oct 8, 2026

    @sw17ch

    The WASI HTTP champions looked at this in triage. Given the many changes that have occurred since this was opened, we're going to close this issue. We believe the best way forward is to let people open new issues with ways that specific performance bottlenecks can be improved.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-httpProposal: wasi-httpS-inactiveStatus: no discussion in over a year. Records silence during triage; not a proposal to close.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions