I profiled my freezing script and found that ~400 Regex.IsMatch executions on compiled regexp last 0.2 seconds!
On my local machine in pure C# the exact same regexps(even heavier) executing 200(!) times faster!
I changed regex to String.IndexOf and now script working fast.
But, why regex'es so slow in ingame scripts?
Regex example:
DisplayRegex":{"Pattern":"(this will never mathch everything|Components|Ore)","Options":9}
On my local machine in pure C# the exact same regexps(even heavier) executing 200(!) times faster!
I changed regex to String.IndexOf and now script working fast.
But, why regex'es so slow in ingame scripts?
Regex example:
DisplayRegex":{"Pattern":"(this will never mathch everything|Components|Ore)","Options":9}