From 01b819633d57ee121b3143956cee647657a4e2fe Mon Sep 17 00:00:00 2001 From: mgechev Date: Wed, 4 May 2022 15:50:27 -0700 Subject: [PATCH] docs: add general change detection overview (#45880) Add a few paragraphs with introduction to how change detection works referencing a video for further details. PR Close #45880 --- aio/content/guide/change-detection.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 aio/content/guide/change-detection.md diff --git a/aio/content/guide/change-detection.md b/aio/content/guide/change-detection.md new file mode 100644 index 00000000000..53aeea64172 --- /dev/null +++ b/aio/content/guide/change-detection.md @@ -0,0 +1,17 @@ +# Angular change detection and runtime optimization + +**Change detection** is the process through which Angular checks to see whether your application state has changed, and if any DOM needs to be updated. At a high level, Angular walks your components from top to bottom, looking for changes. Angular runs its change detection mechanism periodically so that changes to the data model are reflected in an app’s view. Change detection can be triggered either manually or through an asynchronous event (for example, a user interaction or an XHR completion). + +Change detection is a highly optimized performant, but it can still cause slowdowns if the application runs it too frequently. + +In this guide, you’ll learn how to control and optimize the change detection mechanism by skipping parts of your application and running change detection only when necessary. + +Watch this video if you prefer to learn more about performance optimizations in a media format: + +
+ + + +
+ +@reviewed 2022-05-04