Skip to content

Commit df5e59e

Browse files
authored
Merge pull request #2753 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to master to sync with https://github.com/MicrosoftDocs/powerapps-docs (branch live)
2 parents de0f4e1 + 37cacd1 commit df5e59e

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

powerapps-docs/maker/model-driven-apps/optimize-form-performance.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ ms.service: powerapps
88
ms.suite: ""
99
ms.tgt_pltfrm: ""
1010
ms.topic: "article"
11-
applies_to:
12-
- "Dynamics 365 (online)"
13-
- "Dynamics 365 Version 9.x"
14-
- "powerapps"
1511
author: "Mattp123"
1612
ms.assetid: 59cfa5e6-638a-437f-a462-fddfd26fb07d
1713
caps.latest.revision: 8
@@ -41,24 +37,30 @@ Forms that load slowly can reduce productivity and user adoption. Follow these r
4137
## Form scripts
4238
When you have customizations using form scripts make sure that the developer understands these strategies to improve performance.
4339

44-
**Avoid including unnecessary JavaScript web resource libraries**
45-
The more scripts you add to the form, the more time it will take to download them. Usually scripts are cached in your browser after they are loaded the first time, but the performance the first time a form is viewed often creates a significant impression.
40+
**Avoid using synchronous requests**
41+
Synchronous requests can cause slow page loads and unresponsive forms. [Use asynchronous requests instead](https://docs.microsoft.com/powerapps/developer/model-driven-apps/best-practices/business-logic/interact-http-https-resources-asynchronously). See [this blog post](https://powerapps.microsoft.com/en-us/blog/turbocharge-your-model-driven-apps-by-transitioning-away-from-synchronous-requests/) for more examples.
4642

47-
**Avoid loading all scripts in the Onload event**
48-
If you have code that only supports `OnChange` events for fields or the `OnSave` event, make sure to set the script library with the event handler for those events instead of the `OnLoad` event. This way loading those libraries can be deferred and increase performance when the form loads.
43+
**Avoid including unnecessary JavaScript web resource libraries**
44+
The more scripts you add to the form, the more time it will take to download them. Usually scripts are cached in your browser after they are loaded the first time, but the performance the first time a form is viewed often creates a significant impression.
45+
46+
**Avoid loading all scripts in the Onload event**
47+
If you have code that only supports `OnChange` events for fields or the `OnSave` event, make sure to set the script library with the event handler for those events instead of the `OnLoad` event. This way loading those libraries can be deferred and increase performance when the form loads.
4948

5049
**Use collapsed tabs to defer loading web resources**
5150
When web resources or IFRAMES are included in sections inside a collapsed tab they will not be loaded if the tab is collapsed. They will be loaded when the tab is expanded. When the tab state changes the `TabStateChange` event occurs. Any code that is required to support web resources or IFRAMEs within collapsed tabs can use event handlers for the **TabStateChange** event and reduce code that might otherwise have to occur in the `OnLoad` event.
5251

53-
**Set default visibility options**
54-
Avoid using form scripts in the `OnLoad` event that hide form elements. Instead set the default visibility options for form elements that might be hidden to not be visible by default when the form loads. Then, use scripts in the `OnLoad` event to show those form elements you want to display.
52+
**Set default visibility options**
53+
Avoid using form scripts in the `OnLoad` event that hide form elements. Instead set the default visibility options for form elements that might be hidden to not be visible by default when the form loads. Then, use scripts in the `OnLoad` event to show those form elements you want to display.
5554

5655
<a name="BKMK_CommandBar"></a>
5756
## Command bar or ribbon
5857
Keep these recommendations in mind as you edit the command bar or ribbon.
5958

6059
**Keep the number of controls to a minimum**
61-
Within the command bar or the ribbon for the form, evaluate what controls are necessary and hide any that you don’t need. Every control that is displayed increases resources that need to be downloaded to the browser.
60+
Within the command bar or the ribbon for the form, evaluate what controls are necessary and hide any that you don’t need. Every control that is displayed increases resources that need to be downloaded to the browser.
61+
62+
**Use asynchronous network requests in Custom Rules**
63+
When using custom rules that make network requests in Unified Interface, [use asynchronous rule evaluation](https://docs.microsoft.com/powerapps/developer/model-driven-apps/define-ribbon-enable-rules#custom-rule).
6264

6365
## Next steps
6466
[Create and design forms](create-design-forms.md)

0 commit comments

Comments
 (0)