Skip to content

Conversation

dario-piotrowicz
Copy link
Member

Benchmarking results:
benchmark

(not a huge perf improvement 😓)


PS: I've done this alongside @npaun, thanks a lot Nicholas for working this out with me and your C++ tips/guidance 🫶

@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 Jun 1, 2025
@dario-piotrowicz dario-piotrowicz force-pushed the dario-nic/fast-revoke-object-url branch from b6efadf to 6c550e4 Compare June 1, 2025 10:39
Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

I think we should stop implementing C++ APIs twice. I don't mean to ban usage of V8 Fast API, but there should be only one implementation, that is called from both regular and fast API callbacks.
There have already been regressions because of multiple implementations that were not kept in sync.

@dario-piotrowicz dario-piotrowicz force-pushed the dario-nic/fast-revoke-object-url branch 2 times, most recently from 7c628fb to 659e3c0 Compare June 1, 2025 11:00
co-authored-by: Nicholas Paun <npaun@cloudflare.com>
@dario-piotrowicz
Copy link
Member Author

I think we should stop implementing C++ APIs twice. I don't mean to ban usage of V8 Fast API, but there should be only one implementation, that is called from both regular and fast API callbacks. There have already been regressions because of multiple implementations that were not kept in sync.

Thanks so very much for the comment @targos 🙏

I totally agree with the suggestion 🙂 , does this look good? 🙂 🙏 e947f44

@dario-piotrowicz dario-piotrowicz requested a review from targos June 1, 2025 11:40
@dario-piotrowicz dario-piotrowicz added request-ci Add this label to start a Jenkins CI on a PR. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. labels Jun 1, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 1, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Jun 1, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.

Project coverage is 90.24%. Comparing base (968e2f4) to head (3e936b3).
Report is 51 commits behind head on main.

Files with missing lines Patch % Lines
src/node_blob.cc 85.71% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58544      +/-   ##
==========================================
+ Coverage   90.21%   90.24%   +0.02%     
==========================================
  Files         635      635              
  Lines      187580   187603      +23     
  Branches    36853    36857       +4     
==========================================
+ Hits       169231   169300      +69     
+ Misses      11108    11057      -51     
- Partials     7241     7246       +5     
Files with missing lines Coverage Δ
src/node_blob.h 37.50% <ø> (ø)
src/node_external_reference.h 100.00% <ø> (ø)
src/node_blob.cc 76.37% <85.71%> (+0.69%) ⬆️

... and 32 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
Copy link
Collaborator

@dario-piotrowicz dario-piotrowicz added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 1, 2025
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

If I read the benchmark results correct it is a five percent regression?

This would align with other benchmarks with a couple of the "fast" API changes. They often turn out to be slower than before.

I am just requesting changes to verify that. If it's not an issue, please feel free to dismiss my request.
Could you add your benchmark to the code to run it on our machines?

@dario-piotrowicz dario-piotrowicz removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 1, 2025
@dario-piotrowicz
Copy link
Member Author

dario-piotrowicz commented Jun 2, 2025

If I read the benchmark results correct it is a five percent regression?

This would align with other benchmarks with a couple of the "fast" API changes. They often turn out to be slower than before.

I am just requesting changes to verify that. If it's not an issue, please feel free to dismiss my request. Could you add your benchmark to the code to run it on our machines?

darn it, you're totally right, sorry I was so fixated on the number that I missed which was the faster one.... I was sure to have seen at some point my implementation be faster than node... but I might be misremembering it 😖

Thanks so much for catching it @BridgeAR!!! 🫶 and so sorry for my mistake! 😓

I've re-run the hyperfine command multiple times and on my machine yeah I am consistently getting this sort of result 😓

At this point I am completely fine closing this PR, and open a new PR to either remove this todo comment:

// TODO(@anonrig): Add V8 Fast API to the following function

or convert it to a comment explaining the the fast API doesn't help here

how does that sound @BridgeAR? @anonrig?

(or maybe my implementation is flawed?)

@dario-piotrowicz
Copy link
Member Author

Closing in favour of #58614, thanks a lot again for spotting the regression @BridgeAR 🙏

@dario-piotrowicz dario-piotrowicz deleted the dario-nic/fast-revoke-object-url branch June 7, 2025 14:27
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++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants