biocore / biocore/microsetta-public-api
[Optimization] Cache the ranks subsample
- Dominant language
- Python
- Stars
- 2
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
It is probably unnecessary to always [sample](https://github.com/biocore/microsetta-public-api/blob/306e60d9ba66e0c1028e8444c557c4b96c9c5d29/microsetta_public_api/models/_taxonomy.py#L279) for ranks. Instead, we should cache once per dataset and optionally allow the client to request a new sample.
This endpoint has ~500ms turn around time on staging
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in microsetta_public_api/models/_taxonomy.py around the sampling call at line 279 and trace the endpoint that uses it. Measure the current staging turnaround, then determine how a per-dataset cache and an optional new-sample request should behave; done means ranks no longer resample on every request while the requested refresh remains possible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100