Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

Patch and Collect Performance

My scenario is this:
In one module of my application, my end user creates the templates for various Builder models which are later selected for application to each job started for that model to track progress.
Each template is created using a hierarchical file structure like:
       Tasks
             Task Details

So each Model may have 5 or more Options, each Option may have 10+ Tasks, each Task may have 10+ Task Detail records: 550+ record inserts to an on premise SQL database. It’s a time consuming process for manual entry. Some of the larger Builders’ models are fairly similar, but need size/option specs modified.
So for purposes of setup and future Builder models, I created a ‘Duplicate Model’ function. The basic logic for it is:
1. Collect “Master Model” template Options/Tasks/Details into Collections
2. Enter New Model # & Name
3. Patch Options/Tasks/Details to on premise SQL tables
4. Make necessary edits to conform to new Builder model


Well, it’s faster than manual entry, but it is up to a minute wait time for the end user – an opportunity to practice Mindfulness, but usually just a point of frustration.


In lieu of trying to re-train my end users to go the Mindfulness route, I have overlapped some of the slow collects and patches to make the wait time a little less irritating.


I have a button to select the Duplicate Function which now fires off a concurrent Collect for the 3 tables involved and opens a dialogue box for the user to enter new Model # & Name. The confirmation button does not go visible until after the concurrent action is complete. When they confirm, it begins patching the SQL tables for Options/Tasks, but it clears the dialogue box and brings them back to the Builder Model screen before it starts the most time consuming patch to the Task Detail table. By the time they get down to the level of editing the Task Detail for the Model Template, the Details have been patched.


I have gone through the lists and found others that bump up against this, and some solutions using stored procedures and flow, but I guess I was looking for some way to not get too complicated partly due to my lack of experience in those areas.

Community Support
Community Support

Re: Patch and Collect Performance

Hi @lknudson1 ,

Actually, the Collect function would have better performance than Patch function in execution. You could consider open the Developer Tools in your browser, then check the execution performance between Collect function and Patch function.

Note: You can quickly measure your app’s performance by turning on Developer Tools in Microsoft Edge or Google Chrome while running the app.


In addition, there are many reasons that an app can be slow to load, slow to respond, and slow to write to data sources.  Please check the following blog for more details:


You could also consider take a try with the Canvas app Performance tips mentioned within the following article:


Please take a try with above solution, then check if the issue is solved.


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advocate II
Advocate II

Re: Patch and Collect Performance

Hi Kris,

Thanks for your thoughts.  I will try with Collect.


Do you think moving from SQL on premise to SQL VM in Azure services would increase speed at all?


Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,682)