Benchmark LibreOffice Loading and Rendering Speed

Measuring LibreOffice document loading and rendering performance is essential for optimizing system configurations, diagnosing slow file interactions, and evaluating hardware capabilities. This article details the primary automated benchmarking suites, command-line profiling tools, and developer utilities available to accurately evaluate LibreOffice’s speed when opening, parsing, and rendering complex files.

Phoronix Test Suite

The Phoronix Test Suite includes a dedicated benchmark profile called pts/libreoffice. This automated test measures the exact time it takes LibreOffice to execute recurring real-world tasks, such as loading large documents and converting diverse file formats (such as ODT, DOCX, and PPTX) into PDF. Because converting to PDF requires loading, layout calculation, and graphical rendering of every page, it provides a reliable, standardized metric for rendering throughput across different hardware and software configurations.

Hyperfine with Headless Mode

For custom testing of specific documents, combining the command-line benchmarking tool hyperfine with LibreOffice’s headless interface provides highly accurate execution metrics. By running LibreOffice with the flags --headless --convert-to pdf:writer_pdf_Export document.docx, you force the engine to load the document and execute the layout pipeline without launching the graphical user interface. Hyperfine handles warm-up runs, statistical variance, and cache clearing to deliver precise measurements of initial load and rendering overhead.

Python-UNO Scripting

The Universal Network Objects (UNO) interface enables programmatic control over LibreOffice instances. By writing custom Python-UNO scripts, you can connect to a running LibreOffice process and record timestamps before and after invoking the loadComponentFromURL API call. This approach isolates the exact duration required to parse document XML, render layout trees, and paint frames, allowing you to bypass the initial application startup time when evaluating raw rendering speed.

Native LibreOffice Performance Tests

The LibreOffice source repository contains built-in performance testing frameworks. Using make perf-test within the build environment executes dedicated performance test suites designed to detect regressions in document filter speeds and rendering pipelines. Additionally, LibreOffice’s UI testing framework (UITest) can be scripted to simulate user interactions, opening documents and scrolling through pages while tracking execution latency across specific document layouts.

Profiling Tools (Callgrind and Perf)

For granular analysis of rendering bottlenecks at the code level, Linux utilities like perf and Valgrind’s Callgrind can be attached to the soffice.bin process. These tools monitor CPU instructions and function call graphs while a document is loading and rendering, pinpointing whether performance limits stem from font substitution, image decompression, or complex table layout computations.