Mar 27, 2020
May 15, 2020
Closed, Fixed and tested
In traces from customer applications, we notice that much of the request time is spent compiling Regular expressions. Further investigation reveals that it was due to the use of the static method Regex.IsMatch, which compiles the passed-in expression and caches it. However, that cache has a limited size. If you have more expression usages than the cache size, you see these repeated compilations.
Even though CMS Core does not use Regex.IsMatch anymore, it is reasonable that the framework increases the cache size a bit since there are other products, and potentially partner code that uses Regex.IsMatch.