We need to find Eventframes generated for last 21 days and retrieve the attributes (nearly 10) for those. For that we are using FindEventFrames PI-SDK method with the startTime parameter as "t-21d" and getting around 40K event frames in the elapsed time of 9min. This is currently taking a lot of time and we need to improve performance a lot. Please suggest us improving performance, by which methods we need to choose for that.
Code used for finding and retrieving eventframes.
var eventFrames = AFEventFrame.FindEventFrames(
foreach (AFEventFrame ef in eventFrames)
var val1 = ef.Attributes["AssetGlobalUniqueId"].GetValue();
var val2 = ef.Attributes["EventDefinitionId"].GetValue();
var val3 = ef.Attributes["DetectorId"].GetValue();