-
Notifications
You must be signed in to change notification settings - Fork 603
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
admin/render_readmes: Migrate render_pkg_readme()
and find_file_by_path()
fns to async/await
#10070
Conversation
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.
is the text_to_html()
call fast enough to be performed in an async worker thread? I'm wondering if we should keep it in a spawn_blocking()
call
Good call. I'll answer this question after I experiment with it after I get up :) |
I also kept it in crates.io/src/worker/jobs/readmes.rs Lines 54 to 62 in 3bfe1cf
|
0b5a4d2
to
82db663
Compare
After benchmarking, I believe we need to keep |
82db663
to
f063b44
Compare
spawn_blocking()
callrender_pkg_readme()
and find_file_by_path()
fns to async/await
f063b44
to
4e9cd5e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10070 +/- ##
==========================================
- Coverage 89.48% 89.47% -0.01%
==========================================
Files 295 295
Lines 31260 31271 +11
==========================================
+ Hits 27973 27980 +7
- Misses 3287 3291 +4 ☔ View full report in Codecov by Sentry. |
…_path()` fns to async/await It would be great if we could just remove the `spawn_blocking()` call, but the `text_to_html()` call could be blocking in some cases.
4e9cd5e
to
372f5c0
Compare
Ah, it seems I didn't commit the modified part correctly for some reason. |
This PR migrate
render_pkg_readme()
andfind_file_by_path()
fns to async/await.