Skip to content

perf(binding): share NormalModule accessors - #16039

Merged
SyMind merged 1 commit into
mainfrom
seal/normal-module-shared-accessors
Oct 10, 2026
Merged

SyMind merged 1 commit into
mainfrom
seal/normal-module-shared-accessors

Conversation

@LingyuCoder

Copy link
Copy Markdown
Contributor

Motivation

Each NormalModule wrapper creates its own matchResource getter/setter and error getter, duplicating accessor functions and V8 metadata.

Changes

Reuse the existing per-environment shared-descriptor cache for these accessors, preserving own properties, enumeration order and receiver-based behavior. Sharing accessor identities also lets V8 use compact property storage instead of per-instance dictionaries.

The pre-rebase Share landing A/B (full client + server, production, minification off, cache enabled) measured:

  • 241,653 → 3 accessor functions across 80,551 wrappers.
  • Related live V8 structures: 212.03 → 11.06 MiB, saving about 201 MiB, reproduced with both memory and persistent caches.

This is live V8 memory savings; a stable peak-RSS reduction was not established.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T05:45:43.457740Z 24c0595 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 24c0595 to fix(mf): honor singleton options for shared prefixes in manifests (#16012) by harpsealjs

❌ Size increased by 4.00KB from 67.25MB to 67.25MB (⬆️0.01%)

@github-actions

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 529.6 KB 0 0
react-10k 5.4 MB 1.3 MB 0 0
react-5k 2.6 MB 670.9 KB 0 0
ui-components 4.7 MB 1.4 MB 0 0
react-1k 827.7 KB 226.6 KB 0 0

Generated by Rsdoctor GitHub Action

@LingyuCoder
LingyuCoder requested a review from SyMind October 10, 2026 05:59
@codspeed

codspeed Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 54 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing seal/normal-module-shared-accessors (24c0595) with main (278eac8)

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@SyMind
SyMind merged commit 4cc5365 into main Oct 10, 2026
@SyMind
SyMind deleted the seal/normal-module-shared-accessors branch October 10, 2026 06:28
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

⌂ 换网址