Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
lib: faster internal createBlob#49730
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
H4ad commented Sep 20, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Sep 20, 2023
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Sep 20, 2023
Uh oh!
There was an error while loading. Please reload this page.
rluvaton commented Sep 20, 2023
I'm happy to see my PR inspired this 😀 |
RafaelGSS left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
nodejs-github-bot commented Sep 21, 2023
RafaelGSS commented Sep 21, 2023
rluvaton commented Sep 22, 2023
It looks like the benchmark CI was stuck (nothing changed for 8 hours) https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1406/ |
H4ad commented Sep 22, 2023
@rluvaton Can you cancel and start again? I lowered the values of the benchmark for |
rluvaton commented Sep 22, 2023
H4ad commented Sep 22, 2023
This piece of code: constbuff=Buffer.allocUnsafe(1024**2);constsource=newFile(buff,'dummy.txt',options);constnow=performance.now();source.text().then(()=>console.log(`diff: ${performance.now()-now}`));Takes 3s to run, and running 1e3 will take a looong time, I will update the benchmark again, sorry for that. |
nodejs-github-bot commented Oct 4, 2023
Landed in 328bdac...1a839f3 |
PR-URL: #49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
tniessen commented Oct 5, 2023
@anonrig FWIW, none of the three commits that were merged here adhere to our commit message guidelines. |
anonrig commented Oct 5, 2023
Is this a bug with node-core-utils? It seems we shouldn't even land commit that adhere. |
aduh95 commented Oct 5, 2023
Reviewing the commit message is the burden of the PR author and the reviewers, NCU can only catch a subset of commit message "violation" – in this case, it would be very hard for NCU to guess that |
Uzlopak commented Oct 5, 2023
The problem is that the length of the first commit message was reported to be too long. So something should have errored like when you dont prefix the First commit message with |
PR-URL: nodejs#49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs#49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs#49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: #49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs#49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs#49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
PR-URL: nodejs#49730 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Zeyu "Alex" Yang <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Stephen Belanger <[email protected]>
Inspired by nodejs/performance#109, I removed the usage of
ReflectConstructwhich is very heavy to call, and I also added a couple more benchmarks forblob.Improvements:
I also think we can improve
ClonedBlobbut I tried using Function and also Class inheritance but I was not able to make it work correctly, but we probably can improve by 50% if we can make a version withoutReflectConstruct.cc @nodejs/performance