Repository navigation
Parallelize ACR fingerprinting + progressive viewer + reanalyze buttons - #3
Merged
Merged
Conversation
…sive results, reanalyze buttons, redirect on ingest
Speed up fingerprinting by ~10-20x by switching from sequential ACR calls to
20 worker processes — threads serialise on the GIL held by the acrcloud
native C extension, so ProcessPoolExecutor is the only path to true
parallelism. Each worker creates its own ACRCloudRecognizer from a config
dict.
Progressive UX:
- Fingerprint windows now stream results into tracks.json as they complete
(writes a "partial": true marker), and viewer polling reloads the
fingerprint step while it's still "running" rather than waiting for done.
- Library page redirects to the set page as soon as ingest finishes (set_id
is known) so users see analysis populate live instead of staring at a log.
Reanalyze controls:
- New POST /api/sets/{set_id}/analyze endpoint accepts {steps: [...]} and
reruns just those steps via orchestrator.reanalyze_steps() — leaves other
step statuses untouched.
- ↺ reanalyze buttons on BPM, Key, Waveform, and Tracklist panels; click
POSTs the request, subscribes to the SSE job stream, and reloads the
step's data the moment it's done.
Misc: drop uvicorn log level to "warning" to silence per-request audio
range chatter.
robrien20
force-pushed
the
claude/nice-yalow-7664a8
branch
from
May 5, 2026 16:20
48bbcdf to
8954622
Compare
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.
Summary
ThreadPoolExecutor→ProcessPoolExecutor(20 workers) so ACR recognition truly parallelizes. Threads were serialising on the GIL held byacrcloud's native C extension — process pool bypasses it. Each worker constructs its ownACRCloudRecognizerfrom a config dict.tracks.jsonas they complete (with a"partial": truemarker), and the viewer's 2 s polling loop reloads the fingerprint step while it'srunninginstead of waiting fordone. Tracklist populates live./set.html?id=…the momentset_idis known (right after the file is downloaded), rather than waiting for all analysis to finish. The set page handles missing analysis JSONs gracefully and fills them in via polling.↺ reanalyzeon the BPM, Key, Waveform, and Tracklist panels. Backed by a newPOST /api/sets/{set_id}/analyzeendpoint andorchestrator.reanalyze_steps(), which only touches the requested steps' status (noskippedoverwrites).infotowarningso per-request audio range chatter doesn't bury real output.Test plan
[42/168]before[3/168]) and the run finishes much faster than before↺ reanalyzeon each panel; verify just that step re-runs and the data updates without touching the others/set.html?id=…for a set whose analysis is mid-flight; confirm polling kicks in and fills data as it lands