batch_analyze

Function batch_analyze 

Source
pub(crate) async fn batch_analyze(paths: Vec<String>) -> Result<Value, String>
Expand description

Batch analyze: BPM + Key + LUFS for multiple files in parallel, save to SQLite. Analyzes files in parallel (rayon), batch-writes to DB, returns results directly so the frontend can update visible rows without extra IPC.

Uses a small dedicated rayon pool (at most 4 threads) so a full batch does not claim every CPU core during a library scan — unbounded default rayon was starving other work (including audio I/O in the separate engine process on the same machine).