Performance Benchmarks

Local benchmark workflow for parser and variant engine performance.

This page describes benchmark workflows for Flutterwind parser and variant resolution.

Scope

  • Parser throughput (tokenizeFlutterWindClasses, applyClassToStyle)
  • Variant resolution path cost under repeated widget pumps

Benchmark files

  • test/benchmarks/parser_benchmark.dart
  • test/benchmarks/variant_benchmark.dart

Run locally

flutter test test/benchmarks/parser_benchmark.dart
flutter test test/benchmarks/variant_benchmark.dart

Interpretation guidance

  • Benchmarks are deterministic local checks, not cross-machine guarantees
  • Compare deltas between commits on the same machine
  • Treat regressions over ~20% as suspicious
  • Re-run benchmarks multiple times before concluding regression
  • Use DevTools profiling when regressions persist