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

perf(serverless): don't spawn a thread on each request #335

Merged
merged 1 commit into from
Dec 2, 2022

Conversation

QuiiBz
Copy link
Member

@QuiiBz QuiiBz commented Dec 2, 2022

About

Instead of using spawn_blocking which spawns a dedicated blocking thread (until the default limit of 512) to run the task, we can use a LocalPoolHandle of size 1 to always run the timeout futures on the same thread.

@vercel
Copy link

vercel bot commented Dec 2, 2022

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

Name Status Preview Updated
dashboard ✅ Ready (Inspect) Visit Preview Dec 2, 2022 at 6:01PM (UTC)
docs ✅ Ready (Inspect) Visit Preview Dec 2, 2022 at 6:01PM (UTC)
storybook ✅ Ready (Inspect) Visit Preview Dec 2, 2022 at 6:01PM (UTC)
www ✅ Ready (Inspect) Visit Preview Dec 2, 2022 at 6:01PM (UTC)

@QuiiBz QuiiBz enabled auto-merge (squash) December 2, 2022 17:59
@QuiiBz QuiiBz changed the title perf(serverless): do not spawn a thread on each request perf(serverless): don't spawn a thread on each request Dec 2, 2022
@QuiiBz QuiiBz merged commit e10aabe into main Dec 2, 2022
@QuiiBz QuiiBz deleted the perf/serverless-localpoolhandle branch December 2, 2022 18:03
@QuiiBz QuiiBz mentioned this pull request Dec 2, 2022
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.

1 participant