loot/libloot

Cache plugin name regex objects

Ortham opened this issue · 2 comments

Compiling plugin regexes is responsible for 63% of the time spent calling MetadataList::FindPlugin, and 25% of the time spent constructing PluginItem objects in LOOT:

image

With a global cache (static std::map<std::string, std::regex>) hacked in, things look a lot better:

Screenshot 2022-01-01 223401

Done in 15781c9.