performous / performous

An open-source music and rhythm game.
https://performous.org
Other
489 stars 106 forks source link

Default configuration does not make use of cache #433

Closed jose1711 closed 5 years ago

jose1711 commented 5 years ago

Do you want to request a feature or report a bug?

Feature

What did you do?

What did you expect to see?

I was expecting performous to make use of cache resulting in performance gain during startup.

What did you see instead?

In order for performous to start caching, the ~/.ultrastar/songs had to be added to scanned folders manually. This step was not obvious.

Output of performous --version:

Performous 1.1-766-gc4fcfecc

What is your environment & configuration (arguments, platform, ...)?

Arch Linux 64 bit

Baklap4 commented 5 years ago

Did you move into the songbrowser window before closing performous? Also is there a file named: Songs-Metadata.json (With contents) within the $HOME/.cache/performous/ folder?

Hmm i see your problem the current loadcache method within songs.cc uses the technique of the song paths to determine if a song should be loaded or not. We decided to do this to determine if a song is deleted, but is not deleted on the main system. see #386

There are 2 ways of solving this:

  1. Add the default songfolder to the config.xml as default path upon generating it. (:tada:)
  2. Hardcode the songfolder to be always checked. (:heart:)

I'm liking the 1st option more since it gives you more flexability. Please vote by using the smileys on this comment on which we should implement.

jose1711 commented 5 years ago

Did you move into the songbrowser window before closing performous?

mere visit of songbrowser window does not fix this (does not add path/songs list into config.xml). pressing ctrl-s not helping either hence one needs to add the path manually.

Baklap4 commented 5 years ago

Alright thanks i think i'll pick this up someday short :) !

Baklap4 commented 5 years ago

This has been tested and approved by @jose1711

It now uses the default songfolders and cache check if song already existed in cache is now working correctly.