andrewrk / groovebasin

Music player server with a web-based user interface.
MIT License
1.89k stars 119 forks source link

Startup takes way too long, full library scan? #299

Closed fsateler closed 9 years ago

fsateler commented 10 years ago

Groovebasin on my raspberry pi is unusable while it is starting up. It seems that groovebasin is scanning the library all over again:

fingerprint scan file complete: Priceless
loudness scan file complete: Priceless gain -10.961828283479672 duration 247.66693877544802
fingerprint scan file complete: Zee Deveel
loudness scan file complete: Zee Deveel gain -11.278862980609343 duration 232.22857142851745
fingerprint scan file complete: Made for TV Movie
loudness scan file complete: Made for TV Movie gain -11.016840602984981 duration 218.46204081627988
fingerprint scan file complete: Smile Lines
loudness scan file complete: Smile Lines gain -11.080243242236602 duration 239.33387755096265

Along with some broken mp3 headers/frames messages. With a relatively large library this takes a very long time in the puny rpi. It would be great if it the startup time could be reduced.

andrewrk commented 10 years ago

Related: #194

andrewrk commented 10 years ago

If you see "fingerprint scan" and "loudness scan" log entries, those are supposed to work like this:

If the entire album did not finish scanning then perhaps it may have started over when you started the server. However if the entire album did finish scanning and it is being re-scanned, then that is a new bug that you have found.

Note that song scanning happens lazily as you update the play queue and is different from the initial startup when groove basin is finding music files in your library and adding them to the DB. Both of these are independent processes and the results of both are independently cached so that they do not have to repeat.

fsateler commented 10 years ago

Ah that makes sense, as I had not loaded all the music. I'll have the rpi scan the entire library overnight and see what happens on restart.

On Thu, Jul 10, 2014 at 8:24 PM, Andrew Kelley notifications@github.com wrote:

If you see "fingerprint scan" and "loudness scan" log entries, those are supposed to work like this:

  • when the play queue is updated (or on startup), find the songs that have not yet been scanned.
  • for each of these unscanned songs, scan the album that they come from.
  • save the scan information in the database so that we never have to scan it again

If the entire album did not finish scanning then perhaps it may have started over when you started the server. However if the entire album did finish scanning and it is being re-scanned, then that is a new bug that you have found.

Note that song scanning happens lazily as you update the play queue and is different from the initial startup when groove basin is finding music files in your library and adding them to the DB.

— Reply to this email directly or view it on GitHub https://github.com/andrewrk/groovebasin/issues/299#issuecomment-48681513 .

Saludos, Felipe Sateler

andrewrk commented 9 years ago

closing as duplicate of #194