Parallelize candidate lookup for metadata plugins.#6546
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
PR make metadata source plugin search/lookup run in parallel threads, so total wait time go down when many plugins enabled.
Changes:
- Run
candidates/item_candidates/albums_for_ids/tracks_for_idsacross metadata source plugins usingThreadPoolExecutor. - Add changelog entry for concurrent metadata plugin execution.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/changelog.rst | Document new concurrent metadata plugin searches/lookups feature. |
| beets/metadata_plugins.py | Replace sequential plugin iteration with threaded execution using futures. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6546 +/- ##
=======================================
Coverage 71.18% 71.19%
=======================================
Files 150 150
Lines 19172 19175 +3
Branches 3084 3084
=======================================
+ Hits 13648 13651 +3
Misses 4864 4864
Partials 660 660
🚀 New features to boost your workflow:
|
Member
3caa9f8 to
c9604c1
Compare
Contributor
Author
snejus
reviewed
Apr 18, 2026
snejus
approved these changes
Apr 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This pull request introduces concurrent execution of metadata source plugin searches and lookups, which significantly improves performance when multiple plugins are enabled. Instead of running each plugin sequentially, the code now uses threads to perform plugin lookups in parallel, reducing overall wait time for I/O-bound operations.
For me this improved lookup times by up to 5s each! The improvement should roughly scale linear with the number of enabled metadata plugins.