Skip to content

Conversation

@anonrig
Copy link
Member

@anonrig anonrig commented Apr 20, 2025

v8 recommends using v8::LocalVector against vectors if we are using Local handles.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Apr 20, 2025
@anonrig anonrig force-pushed the yagiz/use-local-vector branch from ab3b40a to 38c0069 Compare April 20, 2025 15:57

MaybeStackBuffer<v8::Local<v8::Value>, 128> arr(vec.size());
arr.SetLength(vec.size());
v8::LocalVector<v8::Value> arr(isolate, vec.size());
Copy link
Member

Choose a reason for hiding this comment

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

When I attempted to change these before the feedback was that this was likely to be a performance hit. The suggetion at the time was to have an alternative implmementation of MaybeStackBuffer<v8::Local<T>> that uses v8::LocalVector<T> internally when the size exceeds the stack limit.

@codecov
Copy link

codecov bot commented Apr 20, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.26%. Comparing base (7102ea1) to head (38c0069).
Report is 30 commits behind head on main.

Files with missing lines Patch % Lines
src/util-inl.h 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57950      +/-   ##
==========================================
- Coverage   90.27%   90.26%   -0.01%     
==========================================
  Files         630      630              
  Lines      186115   186112       -3     
  Branches    36467    36468       +1     
==========================================
- Hits       168010   168002       -8     
  Misses      10973    10973              
- Partials     7132     7137       +5     
Files with missing lines Coverage Δ
src/util-inl.h 81.13% <80.00%> (+0.15%) ⬆️

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

@anonrig anonrig closed this Apr 25, 2025
@anonrig anonrig deleted the yagiz/use-local-vector branch April 25, 2025 14:21
Copy link

@sylwek78 sylwek78 left a comment

Choose a reason for hiding this comment

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

VII

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

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants