Summary
Currently cli.py fetches lyrics sequentially per song via client.get_lyrics(song). This works fine for small numbers of songs but becomes a significant bottleneck when using --max-songs 50 or higher.
Proposed Approach
- Use
concurrent.futures.ThreadPoolExecutor (or asyncio + aiohttp) for concurrent lyrics retrieval
- Limit worker count to 3–5 to respect Genius API rate limits
- Ensure thread-safe access to the lyrics cache
Affected Files
src/barscan/genius/client.py
src/barscan/cli.py
Summary
Currently
cli.pyfetches lyrics sequentially per song viaclient.get_lyrics(song). This works fine for small numbers of songs but becomes a significant bottleneck when using--max-songs 50or higher.Proposed Approach
concurrent.futures.ThreadPoolExecutor(orasyncio+aiohttp) for concurrent lyrics retrievalAffected Files
src/barscan/genius/client.pysrc/barscan/cli.py