cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Eelman
Super User
Super User

Is my App too BIG?

I'm putting the final touches on an App I've built for my employer and I've just started noticing some odd things happening as I'm using it. Things like it stopping, clicking buttons and nothing happens, some slowness, etc but these things aren't happening all the time, just occasionally.

 

As I'm just about to launch this app I'm concerned that it may not work as intended in the field, so I did a count of the controls and came up with this table. Over 600 controls, 14 screens, connections to 13 SharePoint lists, 35 built-in-app-collections and connections to Office365Users & Office365!

So is this too Big?

 

AppTooBigTable.jpg

** I've keep all my images under 100KB with only 1 that's above that at 145KB

 

I've read through this doc: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/performance-tips#limit-the-number-of-co...

and it says keep the total number of controls under 500 but is this still valid? Also, I separated the counts for the gallaries as I wasn't sure if they count as 1 or the number of controls inside them.

 

Any help would be greatly appreciated.

 

Cheers

Note: I could totally remove screen 13 as it's a dev screen but that'd only reduce the controls count by about 50.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

The @ID can be a problem, try changing the name of the column to ID1 with the RenameColumns.

it could help, also the suggestion you did in the bottom part is also a good try.

View solution in original post

6 REPLIES 6
timl
Super User
Super User

Hi @Eelman 

I think your app sounds big, but not too big. To diagnose this further, I would use the monitor tool. This might help highlight the areas that are slowing down your app.

https://powerapps.microsoft.com/en-us/blog/introducing-monitor-to-debug-apps-and-improve-performance... 

Most often, retrieving data slows down an app more than the number of controls. This is because data retrieval occurs over the slowest part of the system, which is the network.  A modern PC with GBs of RAM should hopefully handle 600 controls.

The area I would investigate first are the parts in your app where you're calculating record counts. Functions such as Count/CountRows are not delegable. Say you have 1500 records in your SharePoint list and you want to calculate the record count. PowerApps would need to retrieve all 1500 records just to the calculate the count, and it's this sort of thing that would have a large impact on performance.

 

 

Anonymous
Not applicable

Like already mentoined it is big but not too.

Do you have delegation errors on your SP lists?

those are what can be killing your app experience.

@timl thanks for your reply. It's good to know it's not too big, haha

 

I've had a quick look at the monitor tool but hadn't read the documentation (who does lol) yet. I'll read through that and see if it can provide some insights? The issues may also be my company network ... or ... me working too fast ... or ... the cloud being slower at some times, not sure really. Hopefully the monitor tool will throw up the answers.

 

Thanks again.

@Anonymous thanks for your reply.

 

Yes, my app has two formulas with delegation errors. One of those will only act on a SP list under 500 items, however, the other will act on a large SP list. Not sure how to correct this one?

 

The error sits inside a Patch function like so:

ForAll (collectionLOCAL , Patch( mySPList, LookUp( mySPList, ID = collectionLOCAL[@ID] ) , { data to be patched } ) )

- blue lines under  '=' and '[@ID]'

 

I successfully use the Patch() function to a different large SP List which is very similar but instead of collectionLOCAL[@ID] I use a variable to hold the record to be patched and use ... ID = varName.ID ... 

 

The difference between to two operations is that the first one could 1-many records from a collection whereas the second one is a single record getting patched. I tried using Set() & UpdateContext() inside my ForAll() but PowerApps doesn't allows this ...

 

If you had any ideas on how to address this that'd be great. My current solution would be to use Flow to manage the size of the SP List ... or use to Filter to pull in only relevant records (could keep this to under 2000) then use LookUp to this local collection and not the SP List?

Anonymous
Not applicable

The @ID can be a problem, try changing the name of the column to ID1 with the RenameColumns.

it could help, also the suggestion you did in the bottom part is also a good try.

@Anonymous thanks, I used RenameColumns and the delegation warning went away. I've learnt something new here 🙂

For anyone who wants to know how I did it, I adjusted the above formula like so:

 

ForAll (RenameColumns (collectionLOCAL, "ID", "ID1" ) , Patch( mySPList, LookUp( mySPList, ID = ID1) , { data to be patched } ) )

 

Thanks again

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,036)