Skip to content

Benchmarking and profiling

Julien Férard edited this page Jul 8, 2019 · 12 revisions

Benchmark

SimpleODS installation

To benchmark FastODS, you'll have to install the SimpleODS jar, which is present in the src/bench/resources folder. Assuming that you have just "git cloned" the repo and that you are in the fastods directory, just type the following line in your command-line interface:

mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=src/misc/bench/resources/simpleods-0.5.3.jar

Run the benchmark

Then run the benchmark:

mvn -P bench test

Results of the benchmark

See https://github.com/jferard/fastods/wiki/Last-benchmark

  • FastODS version: 0.6.2
  • SimpleODS version: 0.5.3
  • JOpenDocument version: 1.3
  • SimpleODF version: 0.8.2-incubating

On Ubuntu 17.10, 15,6 Gio, Intel® Core™ i5-6600K CPU @ 3.50GHz × 4

Filling a 5000 rows, 20 columns spreadsheet

name average time best time worst time
FastODS 81 58 249
SimpleODS 204 168 336
JOpenDocument 729 577 1725
SimpleODF 67730 66686 71041

Filling a 10000 rows, 40 columns spreadsheet

name average time best time worst time
FastODS 231 222 238
SimpleODS 862 806 985
JOpenDocument 2381 2349 2411
SimpleODF not tested (too slow)

Filling a 15000 rows, 60 columns spreadsheet

name average time best time worst time
FastODS 517 506 591
SimpleODS 2095 1964 2238
JOpenDocument 5948 5533 6501
SimpleODF not tested (too slow)

You can see that FastODS is around ten times faster than JOpenDocument. SimpleODF is clearly not the right tool to write large ODS files.

Profiling with VisualVM

See https://github.com/jferard/fastods/wiki/Last-profiling

Download and install VisualVM:

Step 0: Start VisualVM

  • Windows: click on the icon.
  • Ubuntu/Debian: visualvm

Step 1: Start the tests

Type the command:

mvn -P profile -Dtest=ProfileFastODS#testFast test -DfailIfNoTests=false

This will start an endless test.

Step 2: Start the profiling

Click on org.apache.maven.surefire.booter.ForkedBooter and look at the sampler. Take a snapshot if you want, and stop the test (CTRL + c).