Hello Everyone,
I need some advice on improving the performance of a flow I've created in Power Platform. This flow is designed to fetch data from a Dataverse table and parsed JSON data.
Within this flow, I'm using an "Apply to Each" loop, in which I utilize a "Filter Array" operation to determine whether the current item in the loop (which corresponds to a Unique ID from the JSON) already exists in the Dataverse table. If it does, the flow takes no action, but if it doesn't, it adds a new row.
The section of the flow that is particularly problematic, leading to extended delays, is the portion responsible for executing the "Filter Array" operation and adding new rows to the Dataverse table. These steps are noticeably impacting the overall performance of the flow.
Within the "Filter Array" operation, I've experimented with two approaches: one using a direct link to the Dataverse table, as depicted in the screenshot below, and the other involving a combination of "Select" and "Union" composes to optimize the process by reducing the need to check both tables within the loop. Unfortunately, neither of these strategies had a significant impact on the runtime of the flow.
The issue I'm facing is that the execution time of this flow varies significantly. Some runs complete in less than 10 minutes, while others take much longer, with the longest run so far lasting 26 hours, even though the data being processed remains the same.
I'm seeking advice on how to optimize the flow for consistent and faster performance or if there is a more efficient approach to achieve the same outcome. Your insights and suggestions would be greatly appreciated.
Thank you in advance!


