Fetching records is slow.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- mongodb, python
- Domain
- databases, performance
Research direction
The slow path is the retrieve_docdb_records method, which pages through results with skip and limit; start by reading how it builds its MongoDB query and projection. The issue proposes cursor-based pagination on the created and id fields, possibly with a compound index, but the approach is not settled, so confirm the design with maintainers before coding. Done means large fetches with a projection run measurably faster and existing tests still pass.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
It takes several minutes to fetch a large batch of records even with a projection enabled.
Describe the solution you'd like
Currently, the retrieve_docdb_records method uses skip and limit to perform pagination. We can probably get better performance by switching to a cursor based pagination query. We may need to add a compound index using the created and id fields.
Describe alternatives you've considered
Keep things as they are.
Additional context
Add any other context or screenshots about the feature request here.
- Dominant language
- Python
- Stars
- 3
- Forks
- 0
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AllenNeuralDynamics/aind-data-access-api
-
Remove or update `add_qc_evaluations_to_docdb`May be free again @dougollerenshaw claimed this 104 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
AllenNeuralDynamics/aind-data-access-api#217 · 2 comments · 1 assignee ·
-
methods with v1/2 restrictions should check version and give informative errorsMay be free again @jtyoung84 claimed this 59 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
AllenNeuralDynamics/aind-data-access-api#216 · 8 comments · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Update Python supportMay be free again @jtyoung84 claimed this 304 days ago, and no pull request is open. Open
AllenNeuralDynamics/aind-data-access-api#199 · 1 comment · 1 assignee ·
-
Pandas version causes conflict with numpy >= 2.0May be free again @jtyoung84 claimed this 304 days ago, and no pull request is open. Open
AllenNeuralDynamics/aind-data-access-api#197 · 1 comment · 1 assignee ·
All issues in AllenNeuralDynamics/aind-data-access-api
Similar issues
-
[Bug]: streaming_end_of_stream_only guardrails rescan the whole stream on every chunk - blocks event loopPossibly taken A pull request linked to this issue is open or already merged. Openbug llm translation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
arith ascend bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
tile-ai/tilelang#5173 · 2 comments · 1 reaction ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lanl/text-fetch#92 ·
Maintainers usually reply within 1 day
-
kind: for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
monumental-archive/.github#2284 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
TanbirRamim/open-source-radar#761 ·
Maintainers usually reply within 1 day