Skip to content

Commit aaa3afa

Browse files
[Outlook] (resource usage) Remove outdated information and correct registry values for regular expression thresholds (#5267)
* Remove outdated information and correct registry key values * Apply typo fix from review Co-authored-by: Copilot <[email protected]> * Update client information * Apply suggestions from review * Update ms.date * Clarify registry setting description --------- Co-authored-by: Copilot <[email protected]>
1 parent 0c6b65b commit aaa3afa

File tree

3 files changed

+35
-38
lines changed

3 files changed

+35
-38
lines changed

docs/concepts/resource-limits-and-performance-optimization.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Resource limits and performance optimization for Office Add-ins
33
description: Learn about the resource limits of the Office Add-in platform, including CPU and memory.
4-
ms.date: 01/15/2024
4+
ms.date: 07/14/2025
55
ms.localizationpriority: medium
66
---
77

@@ -11,23 +11,29 @@ Quality add-ins must performs within specific requirements for CPU core usage, m
1111

1212
## Resource usage limits for add-ins
1313

14-
The following runtime resource limits apply to all add-ins running in Office clients on Windows and Mac, but not on mobile apps or in a browser.
14+
> [!NOTE]
15+
> The resource limits in this section only apply to Excel, Outlook on Mac (classic), PowerPoint, and Word.
16+
17+
The following runtime resource limits apply to add-ins running in Office clients on Windows and Mac, but not on mobile apps or in a browser.
1518

16-
- **CPU core usage** - A single CPU core usage threshold of 90%, observed 3 times in 5-second intervals by default.
19+
- **CPU core usage** - A single CPU core usage threshold of 90%, observed three times in five-second intervals by default.
1720

18-
If the Office client detects the CPU core usage of an add-in is above the threshold value, it displays a message asking if the user wants to continue running the add-in. If the user chooses to continue, the Office client does not ask the user again during that edit session. The default interval for an Office client to check CPU core usage is every 5 seconds. Administrators can use the **AlertInterval** registry key to raise the threshold to reduce the display of this warning message if users run CPU-intensive add-ins.
21+
If the Office client detects the CPU core usage of an add-in is above the threshold value, it displays a message asking if the user wants to continue running the add-in. If the user chooses to continue, the Office client does not ask the user again during that edit session. The default interval for an Office client to check CPU core usage is every five seconds. Administrators can use the **AlertInterval** registry key to raise the threshold to reduce the display of this warning message if users run CPU-intensive add-ins.
1922

2023
- **Memory usage** - A default memory usage threshold that is dynamically determined based on the available physical memory of the device.
2124

22-
By default, when a Office client detects that physical memory usage on a device exceeds 80% of the available memory, the client starts monitoring the add-in's memory usage. This is done at the document level for content and task pane add-ins and at the mailbox level for Outlook add-ins. At a default interval of 5 seconds, the client warns the user if physical memory usage for a set of add-ins at the document or mailbox level exceeds 50%. This memory usage limit uses physical rather than virtual memory to ensure performance on devices with limited RAM, such as tablets. Administrators can override this dynamic setting with an explicit limit by using the **MemoryAlertThreshold** Windows registry key as a global setting. They can also adjust the alert interval with the **AlertInterval** key.
25+
By default, when a Office client detects that physical memory usage on a device exceeds 80% of the available memory, the client starts monitoring the add-in's memory usage. This is done at the document level for content and task pane add-ins and at the mailbox level for Outlook add-ins. At a default interval of five seconds, the client warns the user if physical memory usage for a set of add-ins at the document or mailbox level exceeds 50%. This memory usage limit uses physical rather than virtual memory to ensure performance on devices with limited RAM, such as tablets. Administrators can override this dynamic setting with an explicit limit by using the **MemoryAlertThreshold** Windows registry key as a global setting. They can also adjust the alert interval with the **AlertInterval** key.
2326

24-
- **Crash tolerance** - A default limit of 4 crashes during the document's session.
27+
- **Crash tolerance** - A default limit of four crashes during the document's session.
2528

2629
Administrators can adjust the threshold for crashes by using the **RestartManagerRetryLimit** registry key.
2730

28-
- **Application blocking** - A prolonged unresponsiveness threshold of 5 seconds.
31+
- **Application blocking** - A prolonged unresponsiveness threshold of five seconds.
2932

30-
This affects the user's experiences of the add-in and the Office application. When this occurs, the Office application automatically restarts all the active add-ins for a document or mailbox (where applicable), and warns the user which add-in became unresponsive. Add-ins reach this threshold when they do not regularly yield processing while performing long-running tasks. There are techniques listed later in this article to help ensure the add-in doesn't block the Office application. Administrators cannot override this threshold.
33+
This affects the user's experiences of the add-in and the Office application. When this occurs, the Office application automatically restarts all the active add-ins for a document or mailbox (where applicable), and warns the user which add-in became unresponsive. Add-ins reach this threshold when they don't regularly yield processing while performing long-running tasks. There are techniques listed later in this article to help ensure the add-in doesn't block the Office application. Administrators cannot override this threshold.
34+
35+
> [!NOTE]
36+
> Although only Outlook on Mac (classic) monitors resource usage, if the client makes an Outlook add-in unavailable, the add-in also become unavailable in other supported Outlook clients.
3137
3238
### Task pane and content add-ins
3339

@@ -36,22 +42,20 @@ If any content or task pane add-in exceeds the preceding thresholds on CPU core
3642
- Restart the add-in.
3743
- Cancel further alerts about exceeding that threshold. Ideally, the user should then delete the add-in from the document. Continued use of the add-in would risk further performance and stability issues.
3844

39-
### Outlook add-ins
45+
### Evaluation response time for regular expressions in Outlook add-ins
4046

41-
If any Outlook add-in exceeds the preceding thresholds for CPU core or memory usage, or tolerance limit for crashes, the add-in becomes unavailable. The Exchange Admin Center displays the add-in's status.
42-
43-
> [!NOTE]
44-
> Even though only Outlook on Windows (classic) and on Mac monitor resource usage, if either of these clients makes an Outlook add-in unavailable, that add-in also becomes unavailable in Outlook on the web, on mobile devices, and in [new Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627).
45-
46-
In addition to the CPU core, memory, and reliability rules, Outlook add-ins should observe the following rules on activation.
47+
Outlook add-ins that use regular expressions and run in Outlook on Windows (classic) or on Mac (classic) should observe the following rules on activation.
4748

4849
- **Regular expressions response time** - A default threshold of 1,000 milliseconds for Outlook to evaluate all regular expressions in the manifest of an Outlook add-in. Exceeding the threshold causes Outlook to retry evaluation at a later time.
4950

50-
Administrators can adjust this default threshold value of 1,000 milliseconds by using a group policy or application-specific setting for the **OutlookActivationAlertThreshold** key in the Windows registry.
51+
In classic Outlook on Windows, administrators can adjust this default threshold value of 1,000 milliseconds by using a group policy or application-specific setting for the `HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\WEF\Outlook\ActivationAlertThreshold` DWORD value in the Windows registry.
5152

52-
- **Regular expressions re-evaluation** - A default limit of 3 times for Outlook to reevaluate all the regular expressions in a manifest. If evaluation fails to evaluate within the time limit 3 times, Outlook makes the add-in unavailable.
53+
- **Regular expressions re-evaluation** - A default limit of three times for Outlook to reevaluate all the regular expressions in a manifest. If evaluation fails three times, the user must switch to a different mail item then switch back to retry evaluation.
5354

54-
administrators can adjust this number of times to retry evaluation by using a group policy or application-specific setting for the **OutlookActivationManagerRetryLimit** key in the Windows registry.
55+
Administrators can adjust this number of times to retry evaluation by using a group policy or application-specific setting. The location of the setting depends on the platform.
56+
57+
- **Windows**: The `HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\WEF\Outlook\ActivationRetryLimit` DWORD value in the Windows registry.
58+
- **Mac**: The `ActivationRetryLimit` property list in `~/Library/Preferences`.
5559

5660
### Excel add-ins
5761

@@ -70,12 +74,7 @@ Office provides a Telemetry Log that maintains a record of certain events (loadi
7074

7175
`%Users%\<Current user>\AppData\Local\Microsoft\Office\16.0\Telemetry`
7276

73-
For each event that the Telemetry Log tracks for an add-in, there is a date/time of the occurrence, event ID, severity, and short descriptive title for the event, the friendly name and unique ID of the add-in, and the application that logged the event. Refresh the Telemetry Log to see the current tracked events. The following table shows examples of Outlook add-ins that were tracked in the Telemetry log.
74-
75-
|Date/Time|Event ID|Severity|Title|File|ID|Application|
76-
|:-----|:-----|:-----|:-----|:-----|:-----|:-----|
77-
|10/8/2022 5:57:10 PM|7|*Not applicable*|add-in manifest downloaded successfully|Who's Who|69cc567c-6737-4c49-88dd-123334943a22|Outlook|
78-
|10/8/2022 5:57:01 PM|7|*Not applicable*|add-in manifest downloaded successfully|LinkedIn|333bf46d-7dad-4f2b-8cf4-c19ddc78b723|Outlook|
77+
For each event that the Telemetry Log tracks for an add-in, there is a date/time of the occurrence, event ID, severity, and short descriptive title for the event, the friendly name and unique ID of the add-in, and the application that logged the event. Refresh the Telemetry Log to see the current tracked events.
7978

8079
The following table lists the events that the Telemetry Log tracks for Office Add-ins.
8180

@@ -98,7 +97,7 @@ While the resources limits on CPU and memory usage, crash tolerance, and UI resp
9897

9998
- If your add-in needs to read a large volume of data from an unbounded dataset, you can apply paging when reading the data from a table, or reduce the size of data in each shorter read operation, rather than attempting to complete the read in one single operation. You can do this through the [setTimeout](https://developer.mozilla.org/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout) method of the global object to limit the duration of input and output. It also handles the data in defined chunks instead of randomly unbounded data. Another option is to use [async](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/async_function) to handle your Promises.
10099

101-
- If your add-in uses a CPU-intensive algorithm to process a large volume of data, you can use [web workers](https://developer.mozilla.org/docs/Web/API/Web_Workers_API) to perform the long-running task in the background while running a separate script in the foreground, such as displaying progress in the user interface. Web workers do not block user activities and allow the HTML page to remain responsive. For an example of web workers, see [The Basics of Web Workers](https://www.html5rocks.com/tutorials/workers/basics/).
100+
- If your add-in uses a CPU-intensive algorithm to process a large volume of data, you can use [web workers](https://developer.mozilla.org/docs/Web/API/Web_Workers_API) to perform the long-running task in the background while running a separate script in the foreground, such as displaying progress in the user interface. Web workers don't block user activities and allow the HTML page to remain responsive. For an example of web workers, see [The Basics of Web Workers](https://www.html5rocks.com/tutorials/workers/basics/).
102101

103102
- If your add-in uses a CPU-intensive algorithm but you can divide the data input or output into smaller sets, consider creating a web service, passing the data to the web service to off-load the CPU, and waiting for an asynchronous callback.
104103

@@ -143,7 +142,7 @@ Excel.run(async (context) => {
143142
});
144143
```
145144

146-
Note that needing to untrack objects only becomes important when you're dealing with thousands of them. Most add-ins do not need to manage proxy object tracking.
145+
Note that needing to untrack objects only becomes important when you're dealing with thousands of them. Most add-ins don't need to manage proxy object tracking.
147146

148147
## See also
149148

docs/outlook/limits-for-activation-and-javascript-api-for-outlook-add-ins.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Limits for activation and API usage in Outlook add-ins
33
description: Be aware of certain activation and API usage guidelines, and implement your add-ins to stay within these limits.
4-
ms.date: 03/25/2025
4+
ms.date: 07/14/2025
55
ms.topic: best-practice
66
ms.localizationpriority: medium
77
---
@@ -68,11 +68,11 @@ Follow these guidelines when designing activation rules for [contextual Outlook
6868

6969
The following table lists the limits and describes the differences in the support for regular expressions across Outlook clients. The support is independent of any specific type of device and item body.
7070

71-
|Outlook on the web, on new Windows client, and on mobile devices|Outlook on Windows (classic) and on Mac|
72-
|:-----|:-----|
73-
|Clients use regular expression evaluation that's part of JavaScript. It's provided by the browser and supports a superset of ECMAScript 5.|Clients use the C++ regular expression engine provided as part of the Visual Studio standard template library. This engine complies with ECMAScript 5 standards. |
74-
|You should test each regex thoroughly on each Outlook client. If a regex returns different results, rewrite the regex.|Because of the different regex engines, a regex that includes a custom character class based on predefined character classes may return different results in Outlook on Windows (classic) and on Mac versus in Outlook on the web, on mobile devices, and in [new Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627).<br/><br/>As an example, the regex `[\s\S]{0,100}` matches any number, between 0 and 100, of single characters that is a whitespace or a non-whitespace. This regex returns different results depending on your Outlook client.<br/><br/>As a workaround, you should rewrite the regex as `(\s\|\S){0,100}`. This regex matches any number, between 0 and 100, of white space or non-white space.<br/><br/>You should test each regex thoroughly on each Outlook client. If a regex returns different results, rewrite the regex. |
75-
|The resource monitoring and registry settings supported in Outlook on Windows (classic) and on Mac aren't supported in Outlook on the web, on mobile devices, and in new Outlook on Windows. However, add-ins with regular expressions that require excessive amount of evaluation time in Outlook on Windows (classic) and on Mac are disabled for the same mailbox on all the Outlook clients.|By default, the evaluation of all regular expressions for an add-in is limited to one second. Exceeding this limit causes reevaluation of up to three times. Beyond the reevaluation limit, Outlook on Windows (classic) and on Mac prevent the add-in from running for the same mailbox in any of the Outlook clients.<br/><br/>Administrators can override these evaluation limits by using the `OutlookActivationAlertThreshold` and `OutlookActivationManagerRetryLimit` registry keys.|
71+
||Outlook on the web, on new Windows client, and on mobile devices|Outlook on Windows (classic) and on Mac|
72+
|:-----|:-----|:-----|
73+
|**Regex engine**|Clients use regular expression evaluation that's part of JavaScript. It's provided by the browser and supports a superset of ECMAScript 5.|Clients use the C++ regular expression engine provided as part of the Visual Studio standard template library. This engine complies with ECMAScript 5 standards.|
74+
|**Results returned**|You should test each regex thoroughly on each Outlook client. If a regex returns different results, rewrite the regex.|Because of the different regex engines, a regex that includes a custom character class based on predefined character classes may return different results in Outlook on Windows (classic) and on Mac versus in Outlook on the web, on mobile devices, and in [new Outlook on Windows](https://support.microsoft.com/office/656bb8d9-5a60-49b2-a98b-ba7822bc7627).<br/><br/>As an example, the regex `[\s\S]{0,100}` matches any number, between 0 and 100, of single characters that is a whitespace or a non-whitespace. This regex returns different results depending on your Outlook client.<br/><br/>As a workaround, you should rewrite the regex as `(\s\|\S){0,100}`. This regex matches any number, between 0 and 100, of white space or non-white space.<br/><br/>You should test each regex thoroughly on each Outlook client. If a regex returns different results, rewrite the regex.|
75+
|**Evaluation time limit settings**|In Outlook on the web, on Mac (new UI), on mobile devices, and on the new Outlook on Windows, the `ActivationAlertThreshold` and `ActivationRetryLimit` evaluation limit settings for regular expressions aren't supported.|In Outlook on Windows (classic) and on Mac (classic UI), by default, the evaluation of all regular expressions for an add-in is limited to one second. Exceeding this limit causes reevaluation of up to three times. If evaluation fails three times, the user must switch to a different mail item then switch back to retry evaluation.<br/><br/> However, administrators can override these evaluation limits by configuring the `ActivationAlertThreshold` and `ActivationRetryLimit` settings. For guidance on how to configure these settings, see [Evaluation response time for regular expressions in Outlook add-ins](../concepts/resource-limits-and-performance-optimization.md#evaluation-response-time-for-regular-expressions-in-outlook-add-ins).|
7676

7777
### Limits on the size of the item body evaluated
7878

@@ -98,3 +98,4 @@ The following table lists the limits and describes the differences in the matche
9898

9999
- [Deploy and install Outlook add-ins for testing](testing-and-tips.md)
100100
- [Privacy, permissions, and security for Outlook add-ins](../concepts/privacy-and-security.md)
101+
- [Resource limits and performance optimization for Office Add-ins](../concepts/resource-limits-and-performance-optimization.md)

0 commit comments

Comments
 (0)