-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.9.1
-
Component/s: Performance
-
None
The current implementation of IsValidElementName method does the string lookup on the List while checking the exceptions. It is faster to use the Array instead. I also checked the performance of using the HashSet for that case, but it's generally worse for that number of elements.
Here is my benchmark: https://github.com/wojciechcibor/BenchmarkMongoElementNameValidator