Skip to main content

Limits

Image Dimensions

LimitValue
Maximum decoded image size8192 × 8192 px
Exceeded imagesScaled down during decode
Texture atlas size2048 × 2048 px
Maximum gradient stopsNo explicit limit

Memory

LimitValue
Image raw cacheTTL-based eviction, configured via tree.asset_cache_ttl
Image sized cacheSame TTL, byte-budget eviction
Instance buffersPower-of-two growth, 1,048,576 max
Profiler ring buffer240 frames (~4s at 60fps)

Tree Limits

LimitValue
Maximum DOM depthNone (limited by stack space for recursion)
Maximum children per nodeNone (limited by Vec capacity)
Maximum inline stylesheetsNone (limited by memory)
Maximum registered fontsNone (limited by memory)

Rendering Limits

LimitValue
Maximum quads per frameInstance buffer capacity (~500K at max growth)
Maximum glyphs per frameInstance buffer capacity
Maximum images per frameInstance buffer capacity
Maximum nested clip depthNone (stack-based)
Viewport sizePlatform-dependent (surface limits)

WebGPU/WASM (future)

When targeting wasm via WebGPU:

  • Minimum buffer size: 256 bytes (alignment requirement)
  • Buffer readback uses asynchronous mapping with polling
  • Surface format may differ from native
  • No filesystem access for font loading (must use embedded data or fetch)

Performance Characteristics

OperationComplexity
Cascade (cold)O(n × m) where n = nodes, m = applicable rules
Cascade (cached)O(dirty_nodes)
Layout (block)O(n) per subtree
Layout (flex)O(items × iterations)
Layout (grid)O(items × tracks)
PaintO(n)
Hit testingO(depth)
Display listO(draw_commands)