Repository navigation
Concurrent analysis pipeline + immediate set-page redirect (and SoundCloud) - #1
Merged
Merged
Conversation
The previous selector required a video track, so audio-only URLs (SoundCloud, Bandcamp, etc.) silently failed. Adds /ba/b fallbacks so yt-dlp picks the best audio when no video stream exists. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…gest Steps after ingest (peaks, bpm, key, fingerprint) had no data dependency on each other but ran serially. Fan them out across a ThreadPoolExecutor; the status.json read-modify-write is the only shared mutable state, so a single lock around update_step is sufficient. Real-world wins come from overlapping the network-bound fingerprint scan and subprocess-bound peaks step with the CPU-bound bpm/key passes. On the viewer side, the library form now navigates to /set.html as soon as the SSE stream emits a set_id (immediately after ingest), rather than blocking on the full pipeline. The set page already polled status.json and reloaded artifacts as they appeared; added a peaks case so wavesurfer rebuilds with real peaks once that step finishes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
peaks/bpm/key/fingerprintnow fan out across aThreadPoolExecutorinstead of running serially. Real-world win comes from overlapping network-bound fingerprint and subprocess-bound peaks with CPU-bound bpm/key — typically ~1.5–2× on an hour-long set./set.html?id=…as soon as ingest finishes (set_id known), rather than blocking on the full pipeline. The set page already polled status.json and reloaded artifacts on-the-fly; added apeakscase toreloadStepso wavesurfer rebuilds with real peaks the moment that step lands.URL_FORMATwith/ba/bfallbacks so URLs without a video track (SoundCloud shortlinks, Bandcamp, etc.) ingest successfully.Concurrency safety
status.jsonis the only shared mutable state.store.update_stepdoes a read-modify-write of the file, so concurrent calls from worker threads are serialised behind a single lock.bus.publishis already thread-safe so event emission needs no locking. Per-step failure isolation is preserved — a fingerprint failure (e.g. ACR creds missing) still doesn't tank bpm/key data.Test plan
pytest(78 passed)clip30.mp3— three steps started simultaneously onsetplot-step_{0,1,2}threads, peaks completed in 0.04s while bpm/key continued to 1.78son.soundcloud.comshortlink and the new format selector picks audio-only formats (BRUX Boiler Room set ingested assource.m4a)