arm77

AF GetData Performance Issues

Discussion created by arm77 on Jun 18, 2013
Latest reply on Jun 21, 2013 by Gregor

Hi All,

 

I have a very simple code to fetch Historical values.And for Some reason it is slow ( > 7 seconds).

 

Am I missing any optimization technique.The AFattribute is configured as PI Point and i am using the latest RDA in .Net 4

 

 

 

 

 

 

 

AFAttribute att = AFObject.FindObject(@"\\Path of any Af attribute") as AFAttribute;

 

AFTimeRange tr = new AFTimeRange();

 

tr.StartTime = new AFTime(DateTime.Now.AddYears(-1));
tr.EndTime = new AFTime(DateTime.Now);

 

Console.WriteLine(DateTime.Now.ToString());
AFValues vals=    att.GetValues(tr,-200,null);
Console.WriteLine(DateTime.Now.ToString());

 

 

 

Thanks in advance

 

AR

Outcomes