You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the main benefits of moving to FastAPI is being able to handle I/O-bound work asynchronously so slow requests do not block workers and degrade performance for unrelated traffic.
We currently have several partial endpoints with relatively high response times. Endpoints that spend time waiting on outbound HTTP requests should be good candidates to convert to async. Endpoints that are tightly coupled to synchronous database access may be harder to improve and may need separate investigation.
Current timings:
Problem
These endpoints may be tying up workers while waiting on network-bound operations. In a FastAPI app, this reduces the benefit of the migration and can slow down other requests under load.
Goal
Convert the partial endpoints below to async where feasible, prioritizing endpoints that perform outbound HTTP calls.
Checklist of requirements that need to be satisfied in order for this issue to be closed:
[ ]
Stakeholders
Instructions for Contributors
Beforecreating a new branch or pushing up changes to a PR, please first run these commands to ensure your repository is up to date, as the pre-commit bot may add commits to your PRs upstream.
Feature Request
Summary
One of the main benefits of moving to FastAPI is being able to handle I/O-bound work asynchronously so slow requests do not block workers and degrade performance for unrelated traffic.
We currently have several partial endpoints with relatively high response times. Endpoints that spend time waiting on outbound HTTP requests should be good candidates to convert to async. Endpoints that are tightly coupled to synchronous database access may be harder to improve and may need separate investigation.
Current timings:
Problem
These endpoints may be tying up workers while waiting on network-bound operations. In a FastAPI app, this reduces the benefit of the migration and can slow down other requests under load.
Goal
Convert the partial endpoints below to async where feasible, prioritizing endpoints that perform outbound HTTP calls.
Scope
Endpoints to evaluate and convert:
/partials/AffiliateLinks.json/partials/BPListsSection.json#12270_do_search_querymake _do_search_query async for CarouselLoadMore in fastapi #12482_do_browse_querymake _do_browse_query async #12484_do_trends_queryasyncify code for trending and availability fastapi #12508_do_subjects_querymake _do_subjects_query async #12495/partials/FulltextSearchSuggestion.js#12257/partials/LazyCarousel.json/partials/LazyCarousel.json#12288/partials/MyBooksDropperLists.json/partials/ReadingGoalProgress.json/partials/SearchFacets.json#12256Notes
I will be working on this as it is somewhat time sensitive for performance.
Breakdown
Implementation Details (for maintainers)
Related files
Refer to this map of common Endpoints:
*
Requirements Checklist
Checklist of requirements that need to be satisfied in order for this issue to be closed:
Stakeholders
Instructions for Contributors