Drawing from established guidelines on canvas app development, I've compiled a set of practical approaches to elevate the speed and efficiency of your Power Apps creations. These insights stem from understanding app execution cycles, data handling, and typical bottlenecks. Implementing them can significantly enhance user experience by reducing load times and resource consumption.
Keep Data Connections to a Minimum
Aim to use no more than 30 data connectors per app. Each additional connector means users must authenticate more often at startup, prolonging launch times. During runtime, these connectors demand processing power, RAM, and internet bandwidth for data fetches.
To assess this, utilize browser dev tools to monitor app behavior. Apps exceeding this connector threshold often experience delays beyond 15 seconds in data retrieval. Remember, every unique connection counts separately, regardless of whether it's to Dataverse entities, SQL databases, or SharePoint lists.
Cap the Total Controls
Restrict your app to under 500 controls overall. Power Apps renders each via an HTML DOM, and more controls equate to longer rendering periods.
In scenarios where possible, opt for galleries over multiple standalone controls to achieve similar functionality with faster starts. Also, diversify control types sparingly on screens—complex ones like PDF viewers or combo boxes load hefty scripts, slowing things down.
Refine the OnStart Logic
Leverage ClearCollect to store unchanging data locally during sessions. Pair it with Concurrent to fetch multiple sources in parallel, potentially halving data load durations. Check the Concurrent function docs for details.
Sequential loading example:
powerappsClearCollect(Products, 'SalesLT.[Product]'); ClearCollect(Customers, 'SalesLT.[Customer]'); ClearCollect(OrderDetails, '[SalesLT].[SalesOrderDetail]'); ClearCollect(OrderHeaders, '[SalesLT].[SalesOrderHeader]')
This processes one by one, as seen in dev tools timelines.
[Image description: Sequential timeline bars for Products, Customers, OrderDetails, OrderHeaders.]
Parallel version:
powerappsConcurrent( ClearCollect(Products, 'SalesLT.[Product]'), ClearCollect(Customers, 'SalesLT.[Customer]'), ClearCollect(OrderDetails, '[SalesLT].[SalesOrderDetail]'), ClearCollect(OrderHeaders, '[SalesLT].[SalesOrderHeader]') )
[Image description: Overlapping timeline bars showing parallel fetches.]
Note: For OnStart tuning specifics, refer to related performance troubleshooting resources.
Tip: Employ App.StartScreen for streamlined launches and better efficiency.
Locally Cache Reference Data
Use Set to hold lookup results in variables, preventing repeated server calls. Ideal for static info like customer details.
Example:
powerappsSet(OrderInfo, Lookup(Orders, Id = "123-45-6789")); Set(ClientName, OrderInfo.Name); Set(ClientAddr, OrderInfo.Address); Set(ClientMail, OrderInfo.Email); Set(ClientTel, OrderInfo.Phone);
This works well for defaults, user profiles, or infrequently updated contacts. Combine with Defaults or User functions as needed.
Eliminate Cross-Screen Control Links
Screens load on-demand for efficiency, but referencing controls across screens forces premature loading, creating chains that bloat memory.
Mitigate by using globals or collections for data sharing. Exception: If navigation always precedes dependency, no extra load occurs.
Implement Delegation Where Feasible
Offload processing to data sources via delegable functions to cut local resource use, especially for big datasets.
Tip: Consult connector docs for supported delegables.
Example with numeric ID in lists:
| Expression | Can Delegate? |
|---|---|
| Filter('MyList', ID = 123) | Yes |
| Filter('MyList', ID = "123") | No |
Type mismatches (number vs. string) can disable delegation. Non-delegables or low row limits harm performance. See delegation overviews for more.
Manage Extensive Data Collections
Rely on delegable ops and sources to handle vast info without hitting 2,000-row caps for non-delegables. Index searchable columns in sources like SQL or SharePoint.
Note: Explore platform-specific large data slowdowns for deeper insights.
Regularly Update and Republish
Frequent publishing integrates platform enhancements, regenerating apps with current optimizations.
Reuse Formulas Efficiently
Compute complex logic once and reference results elsewhere to avoid redundancy. For instance, set one control's property to the formula, then chain others to that result.
Activate Delayed Output for Inputs
For text fields referenced often, enable DelayOutput. Updates occur post-typing pause, reducing formula reevaluations.
Bypass Form.Updates in Logic
Directly pull values from controls or cards instead of Form.Updates, which loops through all cards unnecessarily.
Boost Gallery Efficiency with Delayed Loading
Galleries may lag on render. Simplify templates by cutting controls and lookups. For intricate ones, set DelayItemLoading true and LoadingSpinner to Controls—enhances feel by showing progress and deferring template renders, freeing screen resources.
Turn On App Preloading
Optionally preload for quicker access:
-
Log into Power Apps, pick Apps.
-
For your app, hit More actions > Settings.
-
Switch Preload app for enhanced performance to Yes.
-
For Teams embeds, re-add the app.
Note: This exposes compiled assets pre-auth, but data access remains secure. Disable for sensitive embedded media. Users might wait longer without it.
Local Storage of App Info
Browser caches app, env, and connection data for fast starts. Clear via browser instructions if needed; respects storage quotas.