updating a lot of UD Text# fields is taking forever, what is a faster way?
What I have found is that using the BRApi.Finance.Members.GetMemberInfo or Metadata.GetMember calls with True for includeProperties or even the first call to BRApi.Finance.UD.Text(...) all incur an average of just over 2 seconds and we are looping through 27,000+ projects so 15 hours to check and update the text fields. It seems that it gets cached either in OneStream or the SQL server so a second call done in the update function is no additional cost. The Dimension Library object obviously does this a much faster way, maybe by specifying the individual properties wanted in one of the optional objects versus all properties?
There has to be a faster way. When using the Dimension Library and setting Grid View's Settings to NOT display parent child relationships, you gain access to the Text# fields. You can update a lot of these at one time FAST.
I have even updated a function I used to add calling the GetMembersUsingFilter with the option to include All properties and the memberinfo for them… using the below code. This MAY have helped by halving the time but I am not sure that wasn’t just a result of caching. I also passed in the MemberInfo Object by Reference into the function Updating the text fields instead of making it get the object again. I think this made some difference but still takes forever.
Dim includeLocalDescription As Boolean = False
Dim culture As String = ""
Dim includeAllDescriptions As Boolean = False
Dim includeAllProperties As Boolean = True
Dim includeMemberInfoForProperties As Boolean = True
Dim includeMemberDim As Boolean = False
Dim includeSupportsChildren As Boolean = False
Dim parentIndentLevel As Boolean = False
Dim mbrDisplayOptions As New MemberDisplayOptions( _
includeLocalDescription, culture, includeAllDescriptions, includeAllProperties, _
includeMemberInfoForProperties, includeMemberDim, includeSupportsChildren, _
parentIndentLevel)
'Execute the filter and check the result
Dim memList As List(Of MemberInfo) = BRApi.Finance.Metadata.GetMembersUsingFilter(si, _
dimensionName, memberFilter, True, , mbrDisplayOptions)
EDITED: Additional context: The source of our data is an external system. It is providing the data for Text1-5 and we pull using SQL from a table. We are looping through the projects comparing the Text fields and updating any that have changed.