Use HashSet for validation cache in MasterNodeManager (#1907)

To improve Contains method performance I changed List type for HashSet.
This commit is contained in:
Cristian Kohlmann
2022-08-12 20:22:28 +02:00
committed by GitHub
parent 0ad5c4c3a3
commit 885a61ba75
@@ -1198,7 +1198,7 @@ namespace Opc.Ua.Server
private void PrepareValidationCache<T>(List<T> nodesCollection,
out Dictionary<NodeId, List<object>> uniqueNodesServiceAttributes)
{
List<NodeId> uniqueNodes = new List<NodeId>();
HashSet<NodeId> uniqueNodes = new HashSet<NodeId>();
for (int i = 0; i < nodesCollection.Count; i++)
{
Type listType = typeof(T);