crypto: Make KeyManager a singleton class

Previously, we were reading the keys everytime a KeyManager object was created, causing yuzu to reread the keys file multiple hundreds of times when loading the game list.
With this change, it is only loaded once.
On my system, this decreased game list loading times by a factor of 20.
This commit is contained in:
FearlessTobi 2020-05-20 21:28:16 +02:00
parent a1d3586e60
commit 5e9e8073a0
13 changed files with 27 additions and 21 deletions

View file

@ -88,7 +88,7 @@ public:
protected:
// A single instance of KeyManager to be used by GetEntry()
Core::Crypto::KeyManager keys;
Core::Crypto::KeyManager& keys = Core::Crypto::KeyManager::instance();
};
class PlaceholderCache {