Skip to content

src: shave about 20 bytes off each TLSWrap instance - #65144

Open
jasnell wants to merge 1 commit into
nodejs:mainfrom
jasnell:jasnell/make_tls_wrap_smaller
Open

src: shave about 20 bytes off each TLSWrap instance#65144
jasnell wants to merge 1 commit into
nodejs:mainfrom
jasnell:jasnell/make_tls_wrap_smaller

Conversation

@jasnell

@jasnell jasnell commented Aug 8, 2026

Copy link
Copy Markdown
Member

By shifting from individual bool fields to a packed struct we can save 20 bytes per TLSWrap instance

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Aug 8, 2026
@jasnell
jasnell requested review from panva and pimterry August 8, 2026 19:08
By shifting from individual bool fields to a packed struct
we can save 20 bytes per TLSWrap instance

Signed-off-by: James M Snell <jasnell@gmail.com>
@jasnell
jasnell force-pushed the jasnell/make_tls_wrap_smaller branch from f70abd2 to 542fa03 Compare August 8, 2026 20:35
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.75510% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.30%. Comparing base (a876a12) to head (542fa03).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
src/crypto/crypto_tls.cc 86.11% 0 Missing and 5 partials ⚠️
src/crypto/crypto_tls.h 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65144      +/-   ##
==========================================
- Coverage   90.32%   90.30%   -0.02%     
==========================================
  Files         759      759              
  Lines      248325   248331       +6     
  Branches    46861    46862       +1     
==========================================
- Hits       224303   224262      -41     
- Misses      15467    15508      +41     
- Partials     8555     8561       +6     
Files with missing lines Coverage Δ
src/crypto/crypto_tls.h 87.50% <92.30%> (+5.14%) ⬆️
src/crypto/crypto_tls.cc 78.78% <86.11%> (-0.02%) ⬇️

... and 30 files with indirect coverage changes

🚀 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.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

nodejs-github-bot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

This comment was marked as outdated.

@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 9, 2026

@gurgunday gurgunday left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

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

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants