This benchmark report consists of two main sections. First, we conducted a short benchmark using real world data generated by memacs-imap.py. This showed some interesting things.
A second benchmark was conducted afterward with artificial generated benchmark files that can easily be generated and checked at your side too. This benchmark is somewhat more detailed.
All test files do have the same header line:
* description :tags:
… followed by 19044 entries with the format:
Test file 1: «no_drawer»
** <2011-12-31 Sat 10:49:52> [[mailto:Karl.Voit@example.com][Karl Voit]]: Re: Hoffe die mail kommt an
Test file 2: «selfdefined_drawer»
** <2011-12-31 Sat 10:49:52> [[mailto:Karl.Voit@example.com][Karl Voit]]: Re: Hoffe die mail kommt an :MEMACSDRAWER: :TO: Armin Wieser <armin.wieser@example.com> :ID: <2011-12-31T10-49-17@example.com> :END:
Test file 3: «properties_drawer»
** <2011-12-31 Sat 10:49:52> [[mailto:Karl.Voit@example.com][Karl Voit]]: Re: Hoffe die mail kommt an :PROPERTIES: :TO: Armin Wieser <armin.wieser@example.com> :ID: <2011-12-31T10-49-17@example.com> :END:
- open open file in Emacs with org-mode
- expand1 expand all ~19050 entries
- collapse collapse all ~19050 entries
- expand2 second expand (after expand + collapse)
Time is measured three times (by hand) in seconds:
Testfile | Testcase | time1 | time2 | time3 | mean | comment |
---|---|---|---|---|---|---|
no_drawer | open | 1 | 1 | 1 | 1.0 | ok |
no_drawer | expand1 | 1 | 1 | 1 | 1.0 | ok |
no_drawer | collapse | 1 | 1 | 1 | 1.0 | ok |
no_drawer | expand2 | 1 | 1 | 1 | 1.0 | ok |
selfdefined_drawer | open | 1 | 1 | 1 | 1.0 | very fast although a drawer exists |
selfdefined_drawer | expand1 | 70 | 90 | 80 | 80.0 | better than «propreties_drawer» but still not fast |
selfdefined_drawer | collapse | 1 | 1 | 1 | 1.0 | ok |
selfdefined_drawer | expand2 | 70 | 80 | 80 | 76.7 | nearly same as «propreties_drawer» |
properties_drawer | open | 190 | 166 | 205 | 187.0 | slow |
properties_drawer | expand1 | 400 | 430 | 450 | 426.7 | slow |
properties_drawer | collapse | 1 | 1 | 1 | 1.0 | ok |
properties_drawer | expand2 | 70 | 90 | 85 | 81.7 | slow |
- Best performance: only without any drawers at all
- Acceptable performance when using another drawer than :PROPERTIES:
- Worst performance when using :PROPERTIES: drawer
- Lenovo X301
- Samsung SSD
- 4GB Ram
- CPU Intel(R) Core(TM)2 Duo CPU U9400 @1.40GHz
- GNU/Linux: Ubuntu 11.10 oneiric
- Org-mode version 7.8.02
- GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
- of 2011-08-14 on allspice
- modified by Debian
- some programs are running in parallel - will make no huge difference
Each test file consists of one header line and 20,000 entries in the second layer. Following sections shows the start of each test file up to the second item in the second layer.
The test file «benchmarkfile_properties.org» was generated by the Python script described in the section below «Generating Script for the Benchmark Files». All other test files were derived from that file by mainly search and replace corresponding parts.
- «benchmarkfile_nodrawer.org»
- «benchmarkfile_owndrawer.org»
- search and replace of «PROPERTIES» with «MEMACSDRAWER»
- «benchmarkfile_properties_noemail.org»
- search and replace of email like structures with normal text
- «benchmarkfile_properties_notags.org»
- removing the tags «:tag1:tag2:» and «:tag3:tag4:»
This is a test file which uses many Org-mode features such as tags, time stamps, PROPERTIES-drawer, links to email addresses, links to web pages, and links to files.
*** multi word description :tag1:tag2: **** <2011-12-31 Sat 10:49:52> [[mailto:foo.bar@example.com][Foo Bar]]: This is the subject line :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_1@example.com> :END: **** <2011-12-31 Sat 10:49:52> [[mailto:foo.bar@example.com][Foo Bar]]: This is the subject line :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_2@example.com> :END:
Intent: what’s the performance difference when using no drawer at all?
Generated by grepping only lines starting with an asterisk:
egrep "^\*" benchmarkfile_properties.org > benchmarkfile_nodrawer.org
** multi word description :tag1:tag2: *** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL1][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file1][This is the subject line]] :tag3:tag4: *** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL2][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file2][This is the subject line]] :tag3:tag4:
Intent: what’s the performance difference when using another drawer than PROPERTIES?
Generated by replacing «PROPERTIES» with «MEMACSDRAWER»:
sed 's/PROPERTIES/MEMACSDRAWER/' < benchmarkfile_properties.org > benchmarkfile_owndrawer.org
*** multi word description :tag1:tag2: **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL1][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file1][This is the subject line]] :tag3:tag4: :MEMACSDRAWER: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_1@example.com> :END: **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL2][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file2][This is the subject line]] :tag3:tag4: :MEMACSDRAWER: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_2@example.com> :END:
Intent: what effect do have links to email addresses?
Generated by removing the mailto-link:
sed 's/\[\[mailto:foo.bar@example.com\]\[Foo Bar\]\]/Foo Bar/' < benchmarkfile_properties.org > benchmarkfile_noemail.org
*** multi word description :tag1:tag2: **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL1][link]]) Foo Bar: [[file:/home/user/path1/file1][This is the subject line]] :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_1@example.com> :END: **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL2][link]]) Foo Bar: [[file:/home/user/path1/file2][This is the subject line]] :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_2@example.com> :END:
Intent: what effect do have tags?
Generated by removing the tags «:tag1:tag2:» and «:tag3:tag4:»:
sed 's/\(:tag1:tag2:\)\|\(:tag3:tag4:\)//' < benchmarkfile_properties.org > benchmarkfile_notags.org
*** multi word description **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL1][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file1][This is the subject line]] :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_1@example.com> :END: **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL2][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file2][This is the subject line]] :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_2@example.com> :END:
Intent: what effect do have time stamps in headings?
Generated by removing the time stamp string «<2011-12-31 Sat 10:49:52>»:
sed 's/<2011-12-31 Sat 10:49:52> //' < benchmarkfile_properties.org > benchmarkfile_notimestamp.org
*** multi word description :tag1:tag2: **** ([[http://example.com/URL1][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file1][This is the subject line]] :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_1@example.com> :END: **** ([[http://example.com/URL2][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file2][This is the subject line]] :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_2@example.com> :END:
Intent: what effect do have links to files?
sed 's/\[\[file:\/home\/user\/path1\/file\(.*\)\]\[\(This is the subject line\)\]\]/\1 \2/' < benchmarkfile_properties.org > benchmarkfile_nofilelink.org
*** multi word description :tag1:tag2: **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL1][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: 1 This is the subject line :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_1@example.com> :END: **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL2][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: 2 This is the subject line :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_2@example.com> :END:
Intent: what effect do have links to web pages?
sed 's/\[\[http:\/\/example.com\/URL\(.*\)\]\[link\]\]/link \1/' < benchmarkfile_properties.org > benchmarkfile_nohreflink.org
*** multi word description :tag1:tag2: **** <2011-12-31 Sat 10:49:52> (link 1) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file1][This is the subject line]] :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_1@example.com> :END: **** <2011-12-31 Sat 10:49:52> (link 2) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file2][This is the subject line]] :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: <myid_2@example.com> :END:
Intent: what effect do have non trivial IDs compared to simple IDs?
sed 's/<myid_\(.*\)@example.com>/myid_\1/' < benchmarkfile_properties.org > benchmarkfile_simpleID.org
*** multi word description :tag1:tag2: **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL1][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file1][This is the subject line]] :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: myid_1 :END: **** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL2][link]]) [[mailto:foo.bar@example.com][Foo Bar]]: [[file:/home/user/path1/file2][This is the subject line]] :tag3:tag4: :PROPERTIES: :TO: Foo Bar <foo.bar@example.com> :ID: myid_2 :END:
- open open file in Emacs with org-mode
- expand1 expand all ~19050 entries
- collapse collapse all ~19050 entries
- expand2 second expand (after expand + collapse)
Time is measured three times (by hand) in seconds:
Testfile | machine 1 | machine 2 | mean | comment |
---|---|---|---|---|
properties | 174.6 | 174.6 | ||
nodrawer | 4. | 4.0 | ||
owndrawer | 14.7 | 14.7 | ||
noemail | 202.3 | 202.3 | ||
notags | 208.3 | 208.3 | ||
notimestamp | 209.6 | 209.6 | ||
nofilelink | 209.4 | 209.4 | ||
nohreflink | 210.9 | 210.9 | ||
simpleID | 216.3 | 216.3 |
FIXXME
Time is measured three times (by hand) in seconds.
- Samsung SSD
- 4GB Ram
- CPU Intel(R) Core(TM)2 Duo CPU U9400 @1.40GHz
- GNU/Linux: Ubuntu 11.10 oneiric
- Org-mode version 7.8.02
- GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
- of 2011-08-14 on allspice
- modified by Debian
- some programs are running in parallel - will make no huge difference
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties | open | 35 | 35 | 36 | 35.3 |
properties | expand1 | 130 | 140 | 120 | 130.0 |
properties | collapse | 1 | 1 | 1 | 1.0 |
properties | expand2 | 9 | 8 | 8 | 8.3 |
sum | 174.6 |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
nodrawer | open | 1 | 1 | 1 | 1.0 |
nodrawer | expand1 | 1 | 1 | 1 | 1.0 |
nodrawer | collapse | 1 | 1 | 1 | 1.0 |
nodrawer | expand2 | 1 | 1 | 1 | 1.0 |
sum | 4.0 |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
owndrawer | open | 1 | 1 | 1 | 1.0 |
owndrawer | expand1 | 7 | 8 | 8 | 7.7 |
owndrawer | collapse | 1 | 1 | 1 | 1.0 |
owndrawer | expand2 | 1 | 7 | 7 | 5.0 |
sum | 14.7 |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_noemail | open | 35 | 36 | 35 | 35.3 |
properties_noemail | expand1 | 160 | 160 | 155 | 158.3 |
properties_noemail | collapse | 1 | 1 | 1 | 1.0 |
properties_noemail | expand2 | 8 | 8 | 7 | 7.7 |
sum | 202.3 |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_notags | open | 36 | 33 | 34 | 34.3 |
properties_notags | expand1 | 162 | 167 | 168 | 165.7 |
properties_notags | collapse | 1 | 1 | 1 | 1.0 |
properties_notags | expand2 | 7 | 8 | 7 | 7.3 |
sum | 208.3 |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_notimestamp | open | 34 | 34 | 35 | 34.3 |
properties_notimestamp | expand1 | 167 | 168 | 167 | 167.3 |
properties_notimestamp | collapse | 1 | 1 | 1 | 1.0 |
properties_notimestamp | expand2 | 7 | 7 | 7 | 7.0 |
sum | 209.6 |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_nofilelink | open | 32 | 33 | 33 | 32.7 |
properties_nofilelink | expand1 | 167 | 170 | 167 | 168.0 |
properties_nofilelink | collapse | 1 | 1 | 1 | 1.0 |
properties_nofilelink | expand2 | 7 | 8 | 8 | 7.7 |
sum | 209.4 |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_nohreflink | open | 36 | 34 | 33 | 34.3 |
properties_nohreflink | expand1 | 168 | 169 | 168 | 168.3 |
properties_nohreflink | collapse | 1 | 1 | 1 | 1.0 |
properties_nohreflink | expand2 | 7 | 7 | 8 | 7.3 |
sum | 210.9 |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_simpleID | open | 35 | 36 | 34 | 35.0 |
properties_simpleID | expand1 | 172 | 178 | 170 | 173.3 |
properties_simpleID | collapse | 1 | 1 | 1 | 1.0 |
properties_simpleID | expand2 | 7 | 7 | 7 | 7.0 |
sum | 216.3 |
- FIXXME:Harddisk
- FIXXME: GB Ram
- FIXXME: CPU GHz
- FIXXME: OS
- FIXXME: Org-mode version
- FIXXME: GNU Emacs version
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties | open | 0.0 | |||
properties | expand1 | 0.0 | |||
properties | collapse | 0.0 | |||
properties | expand2 | 0.0 | |||
sum | 0. |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
nodrawer | open | 0.0 | |||
nodrawer | expand1 | 0.0 | |||
nodrawer | collapse | 0.0 | |||
nodrawer | expand2 | 0.0 | |||
sum | 0. |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
owndrawer | open | 0.0 | |||
owndrawer | expand1 | 0.0 | |||
owndrawer | collapse | 0.0 | |||
owndrawer | expand2 | 0.0 | |||
sum | 0. |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_noemail | open | 0.0 | |||
properties_noemail | expand1 | 0.0 | |||
properties_noemail | collapse | 0.0 | |||
properties_noemail | expand2 | 0.0 | |||
sum | 0. |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_notags | open | 0.0 | |||
properties_notags | expand1 | 0.0 | |||
properties_notags | collapse | 0.0 | |||
properties_notags | expand2 | 0.0 | |||
sum | 0. |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_notimestamp | open | 0.0 | |||
properties_notimestamp | expand1 | 0.0 | |||
properties_notimestamp | collapse | 0.0 | |||
properties_notimestamp | expand2 | 0.0 | |||
sum | 0. |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_nofilelink | open | 0.0 | |||
properties_nofilelink | expand1 | 0.0 | |||
properties_nofilelink | collapse | 0.0 | |||
properties_nofilelink | expand2 | 0.0 | |||
sum | 0. |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_nohreflink | open | 0.0 | |||
properties_nohreflink | expand1 | 0.0 | |||
properties_nohreflink | collapse | 0.0 | |||
properties_nohreflink | expand2 | 0.0 | |||
sum | 0. |
file | case | time 1 | time 2 | time 3 | mean |
---|---|---|---|---|---|
properties_simpleID | open | 0.0 | |||
properties_simpleID | expand1 | 0.0 | |||
properties_simpleID | collapse | 0.0 | |||
properties_simpleID | expand2 | 0.0 | |||
sum | 0. |
«benchmarkfile_properties.org» is exactly related to «benchmarkfile.org» which was generated by following script:
#!/usr/bin/env python # -*- coding: utf-8 -*- # Time-stamp: <2012-01-05 16:26:04 vk> import sys import os import time OUTPUTFILE="benchmarkfile_properties.org" NUM_OF_ENTRIES=20000 if __name__ == "__main__": output = open(OUTPUTFILE, 'w') output.write("* multi word description :tag1:tag2:\n") for number in range(1, NUM_OF_ENTRIES): output.write("** <2011-12-31 Sat 10:49:52> ([[http://example.com/URL" + \ str(number) + "]" + "[link]" + "]) [" + \ "[mailto:foo.bar@example.com]" + "[Foo Bar]" + "]:" + " [" + "[file:/home/user/path1/file" + str(number) + \ "]" + "[This is the subject line]" + "] :tag3:tag4:\n" + \ ":PROPERTIES:\n" + \ ":TO: Foo Bar <foo.bar@example.com>\n" + \ ":ID: <myid_" + str(number) + "@example.com>\n" + \ ":END:\n")
Some brackets were slightly obfuscated to prevent github from interpreting this as Org-mode syntax.