Closed pimzand closed 2 years ago
Debugging discid.py shows:
discid and libdiscid do not expose read_sparse(). It appears they call read_sparse() automatically, and fall back to read() if read_sparse() is not available.
Oviously, we should reduce the number of times jack reads the toc. The first read, used to search an existing jack.toc, should never use the MCN or ISRC features. The second read, used to create the jack.toc, should use the MCN and ISRC features, if the user hasn't disabled it. The third, per-track read should be completely avoided.
For now, the quick and dirty approach was to cache the results of jack.functions.gettoc, so we only call libdiscid.read() once. This still leaves some room for improvement, as searching for existing jack.toc files still reads the disc with MCN and ISRC features enabled.
But already, there's a big improvement while keeping MCN and ISRC features enabled for future use.
works quite well, closing
Reading the TOC of a disc can be very slow, especially when extracting MCN and ISRC, which is done by default.
There are a number of strategies that could improve the speed, preferably without disabling MCN and ISRC extraction.