Home / Function/ optimize() — vue Function Reference

optimize() — vue Function Reference

Architecture documentation for the optimize() function in optimizer.ts from the vue codebase.

Function typescript VueCore GlobalAPI calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  53eb02a0_e5cc_b010_2d4d_1ad77bf5eb9c["optimize()"]
  c66d4aaa_9814_c96c_1d3f_ef17ed6ab384["optimizer.ts"]
  53eb02a0_e5cc_b010_2d4d_1ad77bf5eb9c -->|defined in| c66d4aaa_9814_c96c_1d3f_ef17ed6ab384
  6c590cdd_9255_3485_21a0_c8a067eb1658["createCompiler()"]
  6c590cdd_9255_3485_21a0_c8a067eb1658 -->|calls| 53eb02a0_e5cc_b010_2d4d_1ad77bf5eb9c
  9fc163b0_7973_42d1_4dec_178d72bbafa1["markStatic()"]
  53eb02a0_e5cc_b010_2d4d_1ad77bf5eb9c -->|calls| 9fc163b0_7973_42d1_4dec_178d72bbafa1
  a319c2c8_c1df_c464_6a20_a951bed08523["markStaticRoots()"]
  53eb02a0_e5cc_b010_2d4d_1ad77bf5eb9c -->|calls| a319c2c8_c1df_c464_6a20_a951bed08523
  style 53eb02a0_e5cc_b010_2d4d_1ad77bf5eb9c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/optimizer.ts lines 20–31

export function optimize(
  root: ASTElement | null | undefined,
  options: CompilerOptions
) {
  if (!root) return
  isStaticKey = genStaticKeysCached(options.staticKeys || '')
  isPlatformReservedTag = options.isReservedTag || no
  // first pass: mark all non-static nodes.
  markStatic(root)
  // second pass: mark static roots.
  markStaticRoots(root, false)
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does optimize() do?
optimize() is a function in the vue codebase, defined in src/compiler/optimizer.ts.
Where is optimize() defined?
optimize() is defined in src/compiler/optimizer.ts at line 20.
What does optimize() call?
optimize() calls 2 function(s): markStatic, markStaticRoots.
What calls optimize()?
optimize() is called by 1 function(s): createCompiler.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free