1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-17 01:43:01 +08:00

Compile regexes for speed

This commit is contained in:
Bartłomiej Dach
2024-07-03 15:49:21 +02:00
Unverified
parent 901fec65ef
commit 32b3d3d7df
@@ -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);
}
}