LibraryManager loads and caches beatmaps synchronously and single-threaded, which causes long caching times as most of the time is spent on a single thread while the rest of the CPU does nothing. This PR reworks the loading operation to utilize all available cores to cache as fast as possible.
The class is also converted into an enum singleton to provide a thread-safe singleton to prevent any concurrency issue. Any references to LibraryManager are updated accordingly.
LibraryManager
loads and caches beatmaps synchronously and single-threaded, which causes long caching times as most of the time is spent on a single thread while the rest of the CPU does nothing. This PR reworks the loading operation to utilize all available cores to cache as fast as possible.The class is also converted into an enum singleton to provide a thread-safe singleton to prevent any concurrency issue. Any references to
LibraryManager
are updated accordingly.