Skip to content
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

core: Optimize asynchronous task executions ✈ #15715

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sanjaiyan-dev
Copy link
Contributor

Hello,

This pull request introduces a performance improvement by executing asynchronous tasks concurrently using Promise.all. This enhancement aims to optimize the efficient utilization of hardware resources.

This PR draws inspiration from a similar one (though not identical) in the Deno runtime, where the execution time was reduced by 85% through concurrent processing. For reference, please see: denoland/std#3363.

Thank you for considering these enhancements.

@sanjaiyan-dev sanjaiyan-dev requested a review from a team as a code owner December 21, 2023 19:20
@sanjaiyan-dev sanjaiyan-dev requested review from adamraine and removed request for a team December 21, 2023 19:20
@sanjaiyan-dev sanjaiyan-dev changed the title perf: Concurrency Enhancement: Utilizing Promise.all for Improved Performance ✈ perf: Concurrency Enhancement: Utilizing Promise.all for Performance ✈ Dec 21, 2023
@sanjaiyan-dev sanjaiyan-dev changed the title perf: Concurrency Enhancement: Utilizing Promise.all for Performance ✈ core: Concurrency Enhancement: Utilizing Promise.all for Performance ✈ Dec 21, 2023
@sanjaiyan-dev sanjaiyan-dev changed the title core: Concurrency Enhancement: Utilizing Promise.all for Performance ✈ core: Optimize asynchronous task executions ✈ Dec 21, 2023
@sanjaiyan-dev
Copy link
Contributor Author

Done :)

@connorjclark
Copy link
Collaborator

connorjclark commented Dec 21, 2023

Thanks for the PR! However, there may be a couple faster things in here, but most I think are no faster and just harder to read.

There's no I/O work happening in most of these these aync tasks - so I'd expect this to not be beneficial for those tasks. Do you have performance numbers to back it up? w/o, I'd prefer to keep the current more easily readable/writable/blameable code.

@sanjaiyan-dev
Copy link
Contributor Author

Hi @connorjclark,

Sorry for the delayed response. I hope the current code changes are correct, and I apologize for any inconvenience. 🫱🏼‍🫲🏾

Copy link

vercel bot commented Feb 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lighthouse ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2024 6:21pm

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

Successfully merging this pull request may close these issues.

4 participants