Compile regexes for speed

This commit is contained in:
Bartłomiej Dach 2024-07-03 15:49:21 +02:00
parent 901fec65ef
commit 32b3d3d7df
No known key found for this signature in database

View File

@ -58,8 +58,8 @@ namespace osu.Game.Rulesets.Edit.Checks
public MarkerCheck(string exact, string anyRegex)
{
CorrectMarkerFormat = exact;
ExactRegex = new Regex(Regex.Escape(exact));
AnyRegex = new Regex(anyRegex);
ExactRegex = new Regex(Regex.Escape(exact), RegexOptions.Compiled);
AnyRegex = new Regex(anyRegex, RegexOptions.Compiled);
}
}