cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lknudson1
Level: Powered On

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:
 Model
    Options
       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.

2 REPLIES 2
Community Support Team
Community Support Team

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:

https://baizini-it.com/blog/index.php/2017/09/13/powerapps-improving-app-performance/

 

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

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/performance-tips

 

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.
lknudson
Level: Powered On

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

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 143 members 4,949 guests
Please welcome our newest community members: