Optimizations

This commit is contained in:
Sebastian Bularca
2026-04-20 09:51:08 +02:00
parent 2b48af8d3e
commit e7595bdc89
7 changed files with 152 additions and 48 deletions

View File

@@ -34,12 +34,13 @@ namespace Jovian.EncounterSystem {
return;
}
cache = new Dictionary<string, string>();
cache = new Dictionary<string, string>(lines?.Count ?? 0);
if(lines == null) {
return;
}
foreach(var line in lines) {
for(int i = 0; i < lines.Count; i++) {
var line = lines[i];
if(line != null && !string.IsNullOrEmpty(line.id)) {
cache[line.id] = line.text;
}