When you are using TimeRange in the PI Point data reference, some data methods are not supported (e.g. PlotValues and RecordedValues) as you have pointed out. In fact, you can query the AFAttribute.SupportedDataMethods Property to find out what data methods are supported. This actually calls AFDataReference.SupportedDataMethods for the data reference.
If we are working with a complete list of random attributes that could have different data references and different time methods, we could potentially include the SupportedDataMethods check before using a specific data retrieval methods. However, this is not ideal because we will have to query and retrieve attribute values one at a time. Ideally, we should already have an idea of what attributes we are working with, and pick the best data retrieval method for the list. So let us know what kind of attributes are contained in your attribute list.
Regarding performance difference between GetValues and Data.RecordedValues, let me look up some information for the PI Point Data Reference. Let me know if you are indeed using other data references.
Another resource for you is the PI System Explorer User Guide, pg 54 (referring to 2014 version of the doc). Or LiveLibary, URL: https://livelibrary.osisoft.com/LiveLibrary/web/pub.xql?c=t&action=home&pub=PIServer2014R2-v1&lang=en#addHistory=true&fi…, or AF SDK documentation, installed with PI AF Developer Tools.
AF Product Manager
The determination on which method gives the best performance depends on many factors (e.g. bandwidth, lantency, etc.). See this excellent discussion here: AF SDK performance, serial vs. parallel vs. bulk.
In this case, we are limited by the available data retrieval methods due to the use of the PI Point data reference with TimeRange. For these attributes, we will have to loop through each AFAttribute and call AFAttribute.GetValues. If you have attributes in the list that indeed support the RecordedValues method (e.g. PI Point Data Reference with default time method), one suggestion is to separate them into a separate list so you can use the bulk call AFAttributeList.Data.RecordedValues. One option is to rely on configuration differences (e.g. categories) to differentiate these PI Point data references with different time methods and put them into different lists. At the least, you should be able to use the SupportedDataMethods Property (as suggested above) to check for supported data methods before determining which data call to use.
It's impossible to control what kinds of data reference configuration the attributes will have... In general, the users are free to compose the AF elements, according their necessities... We couldn't control this process...
For this reason, the option to use categories is not a good idea, because we'll have to rely in the users...
Our idea is continue to use the Bulk strategy, and for the failures attributes use the GetValues method to get the values. After this work, we'll study a strategy to consult the SupportedDataMethods to find the most appropriated method to get them.
Thanks for your help, and if you have another ideia we'll appreciate!