Improve performance of random
Open
feature
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 31
Description
Currently, the plugin generates the full query, then samples it in Python.
I suspect it would be faster to randomly sort the query in SQL, and LIMIT it to the number requested.
https://stackoverflow.com/questions/1253561/sqlite-order-by-rand
Contributor guide
Research direction
The issue concerns the plugin's Python query generation and SQLite result sampling. Start by locating where the plugin generates the full query and samples it in Python, then compare that path with SQLite random ordering and LIMIT behavior. Done means the requested number of random results is limited in SQL while preserving existing behavior and improving performance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- database, performance
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100