Improve performance of IndexName's constructor

Found in

EPiServer.Find Front 10.1.0

Fixed in

EPiServer.Find 13.2.6

Created

Nov 13, 2019

Updated

Mar 20, 2020

Area

API

State

Closed, Fixed and tested


Description

IndexName constructor calls this

else if (!Regex.IsMatch(id, validIdRegex, RegexOptions.Compiled))

Even thought it is cached and compiled, this code still calls to the constructor and goes through many steps before getting the cached instance. It can modified to be simpler and more effective.