Deserialize mod rules only once when loading all maps.
This avoids loading, parsing and merging YAML rules for the mod during loading of each individual map. This saves significant time resolving custom rules on each map loaded.
This commit is contained in:
@@ -166,6 +166,11 @@ namespace OpenRA
|
||||
return map;
|
||||
}
|
||||
|
||||
public List<MiniYamlNode>[] GetRulesYaml()
|
||||
{
|
||||
return Manifest.Rules.Select(s => MiniYaml.FromStream(DefaultFileSystem.Open(s), s)).ToArray();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
LoadScreen?.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user