mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 20:13:06 +00:00
Change the concurrent dictionary to a dictionary
It'd be nice to be thread-safe, but I don't really expect multithreaded applications to be calling this method a lot, and I'd imagine the concurrent version has more overhead
This commit is contained in:
parent
29ce9a347b
commit
81e87c1a15
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ namespace PKHeX.Core
|
|||
private const string TranslationSplitter = " = ";
|
||||
private static Assembly thisAssembly = typeof(Util).GetTypeInfo().Assembly;
|
||||
private static string[] manifestResourceNames = thisAssembly.GetManifestResourceNames();
|
||||
private static ConcurrentDictionary<string, string[]> stringListCache = new ConcurrentDictionary<string, string[]>();
|
||||
private static Dictionary<string, string[]> stringListCache = new Dictionary<string, string[]>();
|
||||
|
||||
|
||||
#region String Lists
|
||||
|
@ -86,7 +86,7 @@ namespace PKHeX.Core
|
|||
string[] rawlist = txt.Split('\n');
|
||||
for (int i = 0; i < rawlist.Length; i++)
|
||||
rawlist[i] = rawlist[i].Trim();
|
||||
stringListCache[f] = rawlist;
|
||||
stringListCache.Add(f, rawlist);
|
||||
return rawlist;
|
||||
}
|
||||
public static string[] GetStringList(string f, string l, string type = "text") => GetStringList($"{type}_{f}_{l}");
|
||||
|
|
Loading…
Reference in a new issue