Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
StructuredEditingPerfBench.cpp File Reference

Baseline micro-benchmark for the structured-editing design doc. More...

#include <benchmark/benchmark.h>
#include <string>
#include <string_view>
#include "donner/base/Length.h"
#include "donner/base/ParseWarningSink.h"
#include "donner/base/Path.h"
#include "donner/base/Transform.h"
#include "donner/base/xml/XMLParser.h"
#include "donner/svg/SVGDocument.h"
#include "donner/svg/SVGGeometryElement.h"
#include "donner/svg/SVGGraphicsElement.h"
#include "donner/svg/parser/SVGParser.h"
Include dependency graph for StructuredEditingPerfBench.cpp:

Functions

 BENCHMARK_MAIN ()

Detailed Description

Baseline micro-benchmark for the structured-editing design doc.

Measures the performance of operations that the structured-editing M5/M6 incremental fast path is designed to replace. The numbers from this harness ground every "needs measurement" row in the Performance table of docs/design_docs/structured_text_editing.md.

All benchmarks use representative SVG inputs — not contrived worst-cases — so the baseline reflects what editors actually encounter. Worst-case benchmarks (10k-element SVG, 500-command path) are included as separate entries so the gap is visible.

Usage:

bazel run -c opt //donner/benchmarks:structured_editing_perf_bench -- \
--benchmark_min_time=0.5s