GNOME Bugzilla – Bug 697966
[PATCH] creating the disc id to fetch metadata became slow starting with libdiscid 0.3.1
Last modified: 2013-04-14 09:22:22 UTC
Running goobox with current libdiscid versions (starting with libdiscid 0.3.1) it takes a bit longer until the metadata is fetched and displayed. The reason is: Starting with libdiscid 0.3.1 discid_read() doesn't just read the TOC (which is cached anyways), but reads ISRCs and the MCN from disc. This is unnecessary, since this data is not used and takes more time. (plain libdiscid read() now takes 3, rather than 0.5 seconds) Starting with libdiscid 0.5.0 there is the option to use read_sparse() and only read the TOC again, which should be a lot faster, since the TOC is cached. It would also be possible to read the MCN (= EAN/UPC/"barcode") and use that to decide which MusicBrainz release to use for the metadata to display.
Created attachment 241468 [details] [review] use discid_read_sparse() when available This uses discid_read_sparse() when available and falls back to using read() if not (using a define). This was tested with goobox 3.2.0 and libdiscid 0.5.0 on Arch Linux. With the patch there was less disc access at the start and I checked with additional debug out in libdiscid that no ISRCs and MCNs were read.
The upstream issue is at http://tickets.musicbrainz.org/browse/LIB-29 and I added a similar patch to sound-juicer in https://bugzilla.gnome.org/show_bug.cgi?id=697899
patch pushed to master, thank you.