07-26-2023 11:45 AM
07-26-2023 04:59 PM - edited 07-27-2023 08:20 AM
Move the BRApi call to get the list of MemberInfo outside of the loop. It only needs to be called once. You're calling it on every iteration of the loop which creates a ton of overhead:
Dim ud3MemberLst As List(Of MemberInfo) = BRApi.Finance.Metadata.GetMembersUsingFilter(si, "BU_Product", "U3#BU_Members.Base", True)For Each ud3Mem As MemberInfo In ud3MemberLst
....
Next
Also move the block of code below outside of the loop. It only needs to run once, as its not using ud3Mem
If you really want to push the envelope, iterate your loop with parallel processing:
In the future if you want specific code assistance, consider pasting your textual code into a code block instead of screenshots. I can cut/paste pretty quickly, but I wont type it out for you.