AnsweredAssumed Answered

More efficient ways of cycling through Data

Question asked by mcclellandr on Mar 30, 2015
Latest reply on Mar 31, 2015 by mcclellandr

HI All,

 

I have recently started developing basic tools in .Net to help analyse data.

My background is mostly working with vba and I think some habbits from excel macros have began impacting the speed of some of these tools.

 

My current project follows a rough logic as set out below

 

Start with predefined AFElements list [A].

Cycle through this list[A] (For each) to get next level of elements[B]

Cycle through each of the elements [B] (For each) and look at their attributes [C].

 

Each element in B has >100 Attributes. I am interested in 3 of these attributes which will always either have the same name or will not exist.

For each  of the 3 attributes of interest I do an AFValues function

            AFValues attributeValues = MyAttribute.GetValues(afTimeRange, 0, null);

which gets data over a 24 hour period of interest.

I then cycle through the results to find particualt key events using functions.

 

 

There are some problems wioth the way this is done that I know of and I am hoping I can fix

  • Cycling through 100 attributes for 3 known names seems redundant, I am quite sure I should be able to set them somehow.
  • I think there should be a way to query all 3 attributes at once to make things slightly faster?
  • And again If i am cycling through all element and looking for the same 3 attributes I think I should be able to query those at once as well.

 

 

Any help on this would be great.

My search through some preious questions in a similar area left me rather confused.

 

Thanks,
Rhian

 

Outcomes