eladmarg commented on a change in pull request #410:
URL: https://github.com/apache/lucenenet/pull/410#discussion_r570144168
##########
File path: src/Lucene.Net.Facet/FacetsConfig.cs
##########
@@ -157,17 +153,14 @@ public virtual DimConfig GetDimConfig(string dimName)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public virtual void SetHierarchical(string dimName, bool v)
{
- lock (syncLock)
+ // LUCENENET: Eliminated extra lookup by using TryGetValue instead
of ContainsKey
+ if (!fieldTypes.TryGetValue(dimName, out DimConfig fieldType))
Review comment:
totally agree
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]