Performance measurements for Liquid Glass answer different questions. Building or encoding a displacement map is setup work. Painting and compositing the filtered backdrop are frame costs. Measure both before choosing a quality tier for a production screen.
Capture an engine snapshot
After mounting the surfaces and letting the asynchronous maps settle, read the engine metrics. A React wrapper exposes the same readings through LiquidGlassRef.getMetrics().
import { LiquidGlassEngine } from 'quick-liquid';
const snapshot = LiquidGlassEngine.collectMetrics();
console.log(snapshot);
Use mapGenMs, mapEncodeMs, and mapPixelsComputed to describe map work. The aggregate snapshot's mapsGenerated and cacheHits are cumulative for the loaded module. Compare changes between two snapshots or use a fresh page for a clean run. A reused map can report the timing from its original generation. Engine frame counters describe engine work, while a browser Performance trace supplies compositor and rendering evidence.
Make the comparison repeatable
- Fix browser version, machine, viewport, device pixel ratio, and background. Record all five alongside the package version.
- Profile one surface and a representative group of surfaces. Do separate runs for equal-sized controls and controls of varied widths.
- Record startup separately from five seconds of the same scroll or backdrop movement. Include a forced
cssrun with the same content. - Repeat each case and report a median and a slow-frame percentile. Keep the trace or demo available so another person can reproduce the result.
Compare the lowest acceptable visual tier on both a development machine and a device at the lower end of your target audience. The repo's optimization notes explain the intended cost model. Use measurements from your own layout for performance claims.