Skip to content

client: cache llhttp wasm buffer view#5115

Merged
mcollina merged 2 commits intonodejs:mainfrom
trivikr:client-h1-cache-wasm-memory-view
Apr 25, 2026
Merged

client: cache llhttp wasm buffer view#5115
mcollina merged 2 commits intonodejs:mainfrom
trivikr:client-h1-cache-wasm-memory-view

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented Apr 25, 2026

This relates to...

N/A

Rationale

Parser#execute() copied every socket chunk into wasm memory through a newly created Uint8Array view.
The wasm buffer allocation is already reused until a larger chunk arrives, so the memory view can be cached too.

Changes

Cache the llhttp wasm memory view alongside currentBufferPtr and currentBufferSize, refreshing it only when needed.

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A

Status

Assisted-by: openai:gpt-5.5

trivikr added 2 commits April 25, 2026 07:32
Assisted-by: openai:gpt-5.5
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.14%. Comparing base (5c96f7d) to head (27e470c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5115   +/-   ##
=======================================
  Coverage   93.14%   93.14%           
=======================================
  Files         110      110           
  Lines       35898    35908   +10     
=======================================
+ Hits        33436    33446   +10     
  Misses       2462     2462           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trivikr trivikr marked this pull request as ready for review April 25, 2026 15:02
Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit c342f1b into nodejs:main Apr 25, 2026
35 checks passed
@trivikr trivikr deleted the client-h1-cache-wasm-memory-view branch April 25, 2026 17:13
@github-actions github-actions Bot mentioned this pull request May 1, 2026
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.

3 participants