perf(12-02): increase scan batch size from 50 to 300
Amortizes SQLite fsync cost over 6x fewer transactions. Cuts ~80 fsyncs for a 25K-track library — significant on HDD.
This commit is contained in:
@@ -29,7 +29,7 @@ import (
|
|||||||
// scanBatchSize controls how many files are committed in a single
|
// scanBatchSize controls how many files are committed in a single
|
||||||
// database transaction during a scan. Larger batches amortize
|
// database transaction during a scan. Larger batches amortize
|
||||||
// SQLite's fsync cost but increase the blast radius of a failed commit.
|
// SQLite's fsync cost but increase the blast radius of a failed commit.
|
||||||
const scanBatchSize = 50
|
const scanBatchSize = 300
|
||||||
|
|
||||||
// entityCache holds recently resolved database entities so that
|
// entityCache holds recently resolved database entities so that
|
||||||
// repeated upserts for the same artist/album/cover art within a scan
|
// repeated upserts for the same artist/album/cover art within a scan
|
||||||
|
|||||||
Reference in New Issue
Block a user