I have an app with many screens. Many screens involve galleries and other such things that many users will never need. When you load the app, it looks like all screens are busy updating galleries. These galleries use many calls to SQL via a on-prem gateway. I do not need these screens to do anything until you navigate too them. I thought there was an app setting/option to enable/disable this, but I could not find it. Is this something I can control?
There is a fairly new featured called Delayed Load that can work with the DelayItemLoading property of galleries to help with this performance issue. Have you tried playing around with that a bit?:
Also, have you run a Monitor session to confirm that the SQL calls are to blame?
I think you want to check and enable two different settings. The first is delayed load. and the second is Enhanced performance for hidden controls.
Delayed load is already enabled. However, Enhanced Performance for Hidden controls will not execute functions on my current page like timers and other functions I do not want shown. Am I right on this? Delayed load has always been enabled. However, I'm getting a LOT of SQL traffic from other pages. This is actually taking the SQL server to max CPU, and hanging it up. This was not an issue before SQL 2012 was upgraded to SQL 2019. I'm concerned this is something I'm not going to be able to fix. Something seriously wrong. Been fighitng it for a week, and my apps have ben DOWN the whole time! Management is growing impatient.
@BCLS776 suggestion of checking the monitor to identify the specific pages that are causing the traffic is a good idea. If the two settings suggested won't work for you then your only real choice is to identify the specific issues and redesign the app to be more efficient using its SQL connections. I don't know of any other way to keep offscreen connections from loading.
This app has been working great for 2 years. Issues of CPU overload on the SQL server only comes after an upgrade from SQL Server 2014 to 2019. Do you know of anything specific that might be the cause of this? I have been beating on this issue for a week, and my apps are still down because of it. I have a ticket open for several days, and have been on SQL forums as well. All people tell me is to make my SQL queries 'better'. But, even at their best does not explain why I'm having capacity issues with SQL. Even if I fix it for my development, when users get back on it, it will saturate CPU again, just from scaling to several users at once. Again, this was not a problem for two full years!
I'm not aware of any specific changes between SQL 2014 and SQL 2019 that would cause this. The only way to resolve it will be to use Monitor and SQL Profiler to figure out what is causing the CPU spike. The fact that it wasn't a problem on SQL 2014 doesn't help figure out why its a problem now. Nor is the fact that it worked on SQL 2014 guarantee that it will work on SQL 2019.
Trust me. I have gone through the PA monitor and SQL Profiler. Its shows the ugliness of SQL calls getting all backed up. It does nothing to tell me why. Nor sharing it with forums nor with MS. I'm on my own. Screwed.
@martinav you mentioned in an earlier post about timers in the app -- are these controlling refreshes or similar data operations? If so, is it possible to turn them way down to get a functional app & server, and then re-tune when the stress level is a bit lower? Not a fix, but perhaps some temporary relief.
Are the Galleries directly tied to SQL tables? You may consider changing their `Items` property to point to a Collection instead.
- `OnVisible` of the screen where the data will be used:
ClearCollect(colData, Filter(SQL_SOURCE, criteria = whatever) )
- Then point the Gallery Items to `colData`.
Then the SQL call should only occur when the user visits the screen instead of happening in the background (for unknown reasons).
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.