Skip to content

buffer: cache Environment::GetCurrent to avoid repeated calls #59043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mertcanaltin
Copy link
Member

cache Environment::GetCurrent to avoid repeated calls

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Jul 13, 2025
Copy link

codecov bot commented Jul 13, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.07%. Comparing base (049664b) to head (f444c8e).

Files with missing lines Patch % Lines
src/node_buffer.cc 33.33% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #59043   +/-   ##
=======================================
  Coverage   90.06%   90.07%           
=======================================
  Files         645      645           
  Lines      189130   189131    +1     
  Branches    37094    37089    -5     
=======================================
+ Hits       170339   170353   +14     
+ Misses      11511    11480   -31     
- Partials     7280     7298   +18     
Files with missing lines Coverage Δ
src/node_buffer.cc 68.83% <33.33%> (+0.03%) ⬆️

... and 34 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.

@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 13, 2025
Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

I wonder if the commit message should mention buffer (or the specific buffer API this change is affecting) somewhere 🤔

@mertcanaltin
Copy link
Member Author

mertcanaltin commented Jul 13, 2025

I wonder if the commit message should mention buffer (or the specific buffer API this change is affecting) somewhere 🤔

As you said, I think it would be correct to mention the buffer in the commit message
Thanks for the suggestion! I Updated the commit message.

@mertcanaltin mertcanaltin force-pushed the mert/perf/cache-environment branch from 3dcaaa3 to f444c8e Compare July 13, 2025 11:37
@mertcanaltin mertcanaltin changed the title src: cache Environment::GetCurrent to avoid repeated calls buffer: cache Environment::GetCurrent to avoid repeated calls Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants