You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/developer/common-data-service/best-practices/business-logic/optimize-assembly-development.md
+17-8Lines changed: 17 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ description: "Consider merging separate plug-ins/custom workflow activities into
4
4
services: ''
5
5
suite: powerapps
6
6
documentationcenter: na
7
-
author: jowells
8
-
manager: austinj
7
+
author: JimDaly
8
+
manager: sunilg
9
9
editor: ''
10
10
tags: ''
11
11
ms.service: powerapps
@@ -14,7 +14,7 @@ ms.topic: article
14
14
ms.tgt_pltfrm: na
15
15
ms.workload: na
16
16
ms.date: 1/15/2019
17
-
ms.author: jowells
17
+
ms.author: phecke
18
18
search.audienceType:
19
19
- developer
20
20
search.app:
@@ -33,26 +33,30 @@ search.app:
33
33
34
34
When developing custom assemblies, there are a couple of considerations to take in:
35
35
36
+
1. Assemblies with a large number of custom workflow activities can take a long time to upload when being registered.
36
37
1. Multiple different custom assemblies
37
38
- Increased maintainability complexity
38
39
- Potential increase plug-in execution length
40
+
1. Sandbox assembly size constraint is 16 MB in Common Data Service.
39
41
40
-
2. Sandbox assembly size constraint is 16 MB in Common Data Service.
41
42
42
43
<aname='guidance'></a>
43
44
44
45
## Guidance
45
46
46
-
> [!NOTE]
47
-
> Further Guidance clarification is under development regarding specific details in optimizing assembly development, such as, how to merge separate plug-ins into a single custom assembly and suggestions to minimize the assembly size.
47
+
### Limit the number of Custom Workflow Activities in a Single assembly
48
+
49
+
When an assembly that contains custom workflow activities is uploaded during plug-in registration, additional checks are required for custom workflow activities.
50
+
51
+
While an assembly with hundreds of ordinary plug-in types may be uploaded very quickly, an assembly with more than 100 custom workflow activities may take several minutes or even time out when being registered or updated. We recommend including no more than 50 custom workflow activities in a single assembly.
48
52
49
53
### Consolidate Plug-ins or Custom Workflow Activities into a Single Assembly
50
54
51
55
Plug-ins and custom workflow activities developed for a Common Data Service solution should exist with others in a single Visual Studio project. Consider merging separate plug-ins/custom workflow activities into a single Visual Studio project/assembly unless the plug-ins fall into the following exceptions:
52
56
53
57
1. A plug-in/custom workflow activity needs to be selectively deployed to one environment but not to others.
54
-
55
-
2. The physical assembly size is near or greater than 16 MB for a Common Data Service instance.
58
+
1. The physical assembly size is near or greater than 16 MB for a Common Data Service instance.
59
+
1. There will be more than 50 custom workflow activities in the assembly, as mentioned in [Limit the number of Custom Workflow Activities in a Single assembly](#limit-the-number-of-custom-workflow-activities-in-a-single-assembly)
56
60
57
61
58
62
### Move Plug-ins/Custom Workflow Activities into Multiple Assemblies
@@ -63,7 +67,12 @@ Power Apps and Dynamics 365 (online) has an assembly size constraint of 16 MB wh
63
67
64
68
## Problematic patterns
65
69
70
+
### Assemblies take a long time to upload when being registered
71
+
72
+
When a custom workflow activity type plug-in is uploaded while being registered, each type requires additional validation checking. When an assembly contains more than a hundred custom workflow activity type plug-ins, it could require several minutes to complete the checks and is at risk of timing out.
73
+
66
74
### Multiple assemblies
75
+
67
76
Having multiple assemblies has a couple of areas that can be impacted:
68
77
69
78
1. Performance - each assembly has a lifecycle that is managed by Common Data Service. This includes loading, caching, and unloading the assemblies. Having more than one assembly causes more work to be done on the server, loading and caching an assembly, and could affect the overall plug-in/custom workflow activity execution length.
0 commit comments