The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15 Profiling Tools

In order to speed up the startup time of OpenOffice applications we have developed a set of tools to derive profiling data from those applications. Our approach differs from that of other (commercial) tools in the following points:

Your comments on the profiling tools and on this page are welcome. Please send them to or


The profiling process can be divided into four steps:

  1. Add macros for writing time stamps to your code. This of course requires a rough idea at what code parts are too slow and need to be optimized. Don't write too much time stamps because of the runtime penalty and more important in a run time analysis on a much higher than code line level. This step has to be done only once, so the overhead of adding macros for writing time stamps should not be too high.

  2. Run the office application you are interested in. This generates a log file that contains all time stamps. If you are interested in more then start-up or file-open times use the scripting functionality of the office.

  3. Post process the log files. In this step you can filter away unwanted time stamps that would otherwise clutter the analysis results and obscure those parts that you are interested in. Also the time stamps can be augmented by additional information.

  4. Analyze the log files and generate reports. Compare the new timings with those of previous runs. This enables you to see if a piece of code got slower or faster. Generation of automatic notifications of the responsible developers is also possible.


The classes, functions, and macros used for instrumenting the source code in the first step are ready for using. See the section Source Code for details.

There is a first set of Perl scripts for post processing and generation of simple reports as Calc documents available. Both post-processing and analysis will be extended in the near future. See the Tools section for details.

Source Code

The classes and macros for writing the time stamps can be found in the sal project of the udk. They are defined in the files sal/inc/rtl/logfile.h, sal/inc/logfile.hxx, and sal/rtl/source/logfile.cxx. For inclusion into your source code use #include <rtl/logfile.h> or #include <rtl/logfile.hxx> as described in the How-To (see below under Documentation).


The scripts for post-processing the log files can be found in the (sub) project tools/contrib/profiling. Note that you have to check them out by hand. transforms a log file into a Calc document that contains two data sheets for every thread. The first sheet displays a pretty printed version of the raw data. The second sheet is made up by a table that contains for each function or other scope the minimal, maximal, average, and total time and the number of calls. More details.


There is a How-To that describes how to instrument the source code so that profiling time stamps are written to the log file.

This document describes the format of the time stamps written to the log file.

The Calc document containing the documentation of the time stamps that are written to the profiling log files is here.while some words on what to include into that file can be found here.


The mailing list for discussing matters concerning this profiling project is

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.