Skip to content

Caching for karas & refactor & others

Kubat requested to merge dev-kubat into master

Cache kara data

Cache the duration of all the karas and their duration in seconds in the database.

At launch time hook, the launch_caching is available to begin the work of caching at each startup, so if the user do the update after the startup caching is done it will virtually be shorter to update the lektor database.

With the caching of the duration of karas, add the playtime return values to the stats command.

Refactor

With the cache, do some small refactoring in other places:

  • Hide away the struct lkt_message definition and add functions to manipulate the opaque type
  • Hide away the struct lkt_search definition
  • Get ride of enum, all enums are now in upper case
  • launch_klkt is now launch_ext_klkt

Side corrections and improvements

As I don't know how to make a branch for each change as it should be, there are some other fixes:

  • Import is_new from kurisu
  • SDL2 thread set the SDL2 window title (seems to work better)
  • Fix some SEGV and memory leaks and other small bugs
  • Get ride of some extern global variables
  • Don't exit after repo operations (pthread_exit, but it should have been return NULL)
Edited by Kubat

Merge request reports