sp/js/app.js
/**
   * Goal of the optimizer: walk the generated template AST tree
   * and detect sub-trees that are purely static, i.e. parts of
   * the DOM that never needs to change.
   *
   * Once we detect these sub-trees, we can:
   *
   * 1. Hoist them into constants, so that we no longer need to
   *    create fresh nodes for them on each re-render;
   * 2. Completely skip them in the patching process.
   */
Goal of the optimizer: walk the generated template AST tree
and detect sub-trees that are purely static, i.e. parts of
the DOM that never needs to change.

Once we detect these sub-trees, we can.

1. Hoist them into constants, so that we no longer need to
create fresh nodes for them on each re-render;
2. Completely skip them in the patching process.
Goal of the optimizer : walk the generated template AST tree and detect sub - trees that are purely static i . e . parts of the DOM that never needs to change . Once we detect these sub - trees we can . 1 . Hoist them into constants so that we no longer need to create fresh nodes for them on each re - render ; 2 . Completely skip them in the patching process .
function optimize(root, options) {
    if (!root) {
      return;
    }
    isStaticKey = genStaticKeysCached(options.staticKeys || '');
    isPlatformReservedTag = options.isReservedTag || no;
    markStatic$1(root);
    markStaticRoots(root, false);
  }
function optimize ( root , options ) { if ( ! root ) { return ; } isStaticKey = genStaticKeysCached ( options . staticKeys || '' ) ; isPlatformReservedTag = options . isReservedTag || no ; markStatic$1 ( root ) ; markStaticRoots ( root , false ) ; }
Goal of the optimizer: walk the generated template AST tree
 and detect sub-trees that are purely static, i.e.
Goal of the optimizer : walk the generated template AST tree and detect sub - trees that are purely static i . e .
// first pass: mark all non-static nodes. // second pass: mark static roots.