Measuring Performance
A benchmark answers only the question it measures. Measure the complete workflow used by your application: a formula-only microbenchmark, a first export, a warm request and an HTTP end-to-end request answer different questions.
Good measurements decide the pool size and service limits of a deployment, so choose the scenarios, the recorded values and the hardware with care.
Measure Browser Zoom
The browser editor paints the cells visible in its viewport. With a fixed viewport and uniform row and column sizes, 50 percent zoom shows roughly four times as many cells as 100 percent; 25 percent shows roughly sixteen times as many. Include zoom and the visible cell count when comparing paint or scroll times.
After loading a representative workbook in an existing Spreadsheet, change its view through EditorUi.setZoom:
editor.ui.setZoom(50);
Repeat the same scroll or edit at 100, 50 and 25 percent with the same host size, workbook and loaded fonts. Separate the time spent changing zoom from subsequent scrolling and editing. Browser zoom and the editor's worksheet zoom are separate settings; hold browser zoom constant during the comparison.
During each screen paint, the renderer reuses resolved cell formatting for backgrounds and text, skips text setup for empty cells with the General number format and avoids processing cell borders where none are present. This reuse ends with the paint and does not introduce a persistent cell rendering cache. The renderer continues to draw visible content without sampling cells or omitting text.
These screen optimizations keep the public API and workbook data unchanged. Editor zoom does not reduce the resolution or content of SVG or PDF exports.
Measure a Live Worksheet Feed
Run the Razor sample and open Live Trade Blotter from the workbook sample. The feed simulates price and fill changes across 1,000 orders. Each tick writes a rectangular batch with Range.setValues. Worksheet formulas calculate profit and loss from those values.
Change the update interval and orders per batch to vary the load. Compare the actual cells written per second, median write time, and 95th-percentile time through the next browser paint opportunity. The last measure includes browser scheduling. If a batch takes longer than the selected interval, the feed waits for it to finish before starting the next batch.
Choose the Scenarios
- Edits. Compare XLSX load plus PDF export with no edits, then the same operation after changing input cells that affect formulas.
- Documents. Use several workbook sizes, styles, fonts and page counts.
- Controls. Test both reused controls and fresh controls, then bounded independent parallel workers.
Record the Measurements
Record these values:
- Times: load, edit, export, validation, initialization and disposal, total request latency and actual batch wall time.
- Results: throughput and failures.
- Resources: CPU and memory.
- Output: PDF pages and bytes.
State whether file and network I/O and queueing are included.
Important
Calculating Throughput. Throughput is successful requests divided by batch wall time, not divided by the sum of parallel request durations.
Warm Up and Verify
Warm each worker with representative work. Exclude warmup only when you report warm performance, and disclose that exclusion.
Verify table and formula preservation and the exported content. A fast incorrect or truncated export is not a successful result.
Use the .NET Benchmark Sample
The supplied .NET benchmark sample generates actual XLSX tables, tests unchanged and edited exports, uses independent workers and writes raw CSV and JSON plus a readable report. Its numbers are local workload observations rather than universal capacity guarantees. The example is in the solution's samples. Use the released Server package when reproducing package-consumer behavior.
Interpret the Results
Report distributions and failure counts, not only the fastest run. Small samples give rough tail percentiles.
CPU power, background applications, file caches, font loading and fixed scenario order can influence results. Repeat the measurements on the intended deployment hardware before choosing a pool size or service limits.
Next Steps
- Lifetime and Concurrency: bound parallel requests and tell a pool of independent controls from shared capacity.
- Backend Services: build the request flow and pool that you measure.