Merge "documenting optimized flash super" into main am: a3b232c30c

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2725774

Change-Id: I68a8ae36335a2aec2ea1e085a672da649552d319
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/fastboot/README.md b/fastboot/README.md
index 55583eb..28e623c 100644
--- a/fastboot/README.md
+++ b/fastboot/README.md
@@ -188,6 +188,21 @@
     erase %s           Erase a given partition (can only be used in conjunction)
                        with if-wipe -> eg. if-wipe erase cache
 
+Flashing Optimization:
+
+    After generating the list of tasks to execute, Fastboot will try and
+    optimize the flashing of the dynamic partitions by constructing an
+    optimized flash super task. Fastboot will explicitly pattern match the
+    following commands and try and concatenate it into this task. (doing so
+    will allow us to avoid the reboot into userspace fastbootd which takes
+    significant time)
+
+    //Optimizable Block
+    reboot fastboot
+    update-super                        ---> generate optimized flash super task
+    $FOR EACH {dynamic partition}
+        flash {dynamic partition}
+
 ## Client Variables
 
 The "getvar:%s" command is used to read client variables which