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

Don't run sync functions in pool #282

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

JackThomson2
Copy link
Contributor

Don't run synchronous functions in the tokio threadpool, this is just adding overhead. We need to acquire the GIL anyway so it won't be run async anyway. Server will still accept connections as this is done in a worker thanks to Actix design

This PR fixes #

@netlify
Copy link

netlify bot commented Sep 13, 2022

Deploy Preview for robyn canceled.

Name Link
🔨 Latest commit 63b1c90
🔍 Latest deploy log https://app.netlify.com/sites/robyn/deploys/6320666155419b000818ec99

1 similar comment
@netlify
Copy link

netlify bot commented Sep 13, 2022

Deploy Preview for robyn canceled.

Name Link
🔨 Latest commit 63b1c90
🔍 Latest deploy log https://app.netlify.com/sites/robyn/deploys/6320666155419b000818ec99

@sansyrox
Copy link
Member

@JackThomson2 , I just had a look at the PR. It looks good.

But I have one question. Does it have any effect on the performance?

@JackThomson2
Copy link
Contributor Author

Yeah it is much faster than previously, I'll make another PR to remove async from the function in techempowered as well should help scores go up massively

@sansyrox
Copy link
Member

@JackThomson2 , that sounds great. Thank you! :D

I am not sure how Techempowered benchmarks are scored. But if it is not a dynamic request, do you think const requests would help: https://sansyrox.github.io/robyn/#/features?id=const-requests ?

Copy link
Member

@sansyrox sansyrox left a comment

Choose a reason for hiding this comment

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

LGTM! ✨

@sansyrox sansyrox merged commit 4ef01e6 into sparckles:main Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants