Searching titles is the most common search, and a major way of navigating a wiki. It is also a very fast search (if done right)
This test the very small wiki with only the system and help pages and about 100 new pages. In typical wiki the results will be much slower.
All tests run a search for "help config" without the quotes, which mean the title is search twice, once for help and once for config.
patch 467
ab -n 11 -c 1 'http://localhost:8000/HelpOnConfiguration/EmailSupport?action=fullsearch&context=180&value=help+config&titlesearch=Titles'
Requests per second: 1.31 [#/sec] (mean)
304382 function calls (284462 primitive calls) in 12.368 CPU seconds
Ordered by: internal time, call count
List reduced from 227 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
33270 2.796 0.000 2.796 0.000 posixpath.py:171(exists)
26620/13700 2.162 0.000 6.119 0.000 Page.py:78(get_rev)
6580 1.288 0.000 2.450 0.000 wikiacl.py:185(may)
6460 1.156 0.000 1.166 0.000 search.py:121(sortByCost)
6600 1.115 0.000 1.115 0.000 posixpath.py:144(getmtime)
10 1.006 0.101 1.006 0.101 caching.py:92(content)
88080 0.614 0.000 0.614 0.000 posixpath.py:56(join)
14020 0.388 0.000 0.388 0.000 wikiutil.py:154(quoteWikinameFS)
6540 0.354 0.000 0.425 0.000 wikiutil.py:187(unquoteWikiname)
14020/7020 0.311 0.000 4.629 0.001 Page.py:120(getPagePath)
20 0.205 0.010 10.652 0.533 Page.py:1316(listPages)
6580 0.130 0.000 6.529 0.001 Page.py:1266(getACL)
6580 0.110 0.000 9.154 0.001 security.py:52(<lambda>)
13320 0.106 0.000 0.106 0.000 Page.py:28(__init__)
6580 0.072 0.000 0.072 0.000 wikiutil.py:56(decodeUserInput)
5280 0.065 0.000 0.078 0.000 wikidicts.py:271(has_member)
6580 0.060 0.000 0.060 0.000 security.py:45(__getattr__)
6972 0.057 0.000 0.058 0.000 search.py:272(search)
6610 0.055 0.000 5.198 0.001 Page.py:199(_text_filename)
10 0.048 0.005 1.056 0.106 wikidicts.py:300(scandicts)
Ordered by: internal time, call count
List reduced from 227 to 20 due to restriction <20>
Function was called by...
posixpath.py:171(exists) Page.py:78(get_rev)(26620) 6.119
Page.py:120(getPagePath)(20) 4.629
Page.py:332(exists)(50) 0.178
Page.py:1266(getACL)(6580) 6.529
Page.py:78(get_rev) Page.py:120(getPagePath)(12960) 4.629
Page.py:199(_text_filename)(6610) 5.198
Page.py:332(exists)(320) 0.178
Page.py:1316(listPages)(6730) 10.652
wikiacl.py:185(may) security.py:52(<lambda>)(6580) 9.154
search.py:121(sortByCost) search.py:126(search)(6460) 1.257
posixpath.py:144(getmtime) Page.py:272(lastEditInfo)(10) 0.016
Page.py:1266(getACL)(6580) 6.529
logfile.py:160(date)(10) 0.000
caching.py:92(content) wikidicts.py:300(scandicts)(10) 1.056
posixpath.py:56(join) Page.py:78(get_rev)(53240) 6.119
Page.py:120(getPagePath)(28040) 4.629
Page.py:427(getPageList)(10) 10.655
Page.py:1316(listPages)(6730) 10.652
caching.py:13(__init__)(10) 0.001
caching.py:34(_filename)(10) 0.000
wikiaction.py:836(getPlugins)(40) 0.006
wikiutil.py:154(quoteWikinameFS) Page.py:120(getPagePath)(14020) 4.629
wikiutil.py:187(unquoteWikiname) Page.py:1316(listPages)(6540) 10.652
Page.py:120(getPagePath) AttachFile.py:50(getAttachDir)(10) 0.005
Page.py:78(get_rev)(6930) 6.119
Page.py:120(getPagePath)(7000) 4.629
Page.py:228(_last_edited)(10) 0.005
Page.py:332(exists)(50) 0.178
Page.py:427(getPageList)(10) 10.655
editlog.py:74(__init__)(10) 0.001
Page.py:1316(listPages) Page.py:427(getPageList)(20) 10.655
Page.py:1266(getACL) security.py:52(<lambda>)(6580) 9.154
security.py:52(<lambda>) Page.py:1316(listPages)(6530) 10.652
__init__.py:488(shouldShowPageinfo)(10) 0.013
__init__.py:750(shouldShowEditbar)(20) 0.017
__init__.py:910(editbar)(10) 0.062
request.py:366(getAvailableActions)(10) 0.017
Page.py:28(__init__) AttachFile.py:50(getAttachDir)(10) 0.005
Page.py:1252(getParentPage)(20) 0.010
request.py:670(run)(10) 12.368
search.py:945(searchPages)(6460) 11.988
security.py:52(<lambda>)(6580) 9.154
text_html.py:212(pagelink)(80) 0.056
wikiutil.py:432(getSysPage)(150) 0.080
wikiutil.py:909(send_title)(10) 0.232
wikiutil.py:56(decodeUserInput) request.py:582(_setup_args_from_cgi_form)(40) 0.001
wikiutil.py:187(unquoteWikiname)(6540) 0.425
wikidicts.py:271(has_member) wikiacl.py:185(may)(5280) 2.450
security.py:45(__getattr__) Page.py:1316(listPages)(6530) 10.652
__init__.py:488(shouldShowPageinfo)(10) 0.013
__init__.py:750(shouldShowEditbar)(20) 0.017
__init__.py:910(editbar)(10) 0.062
request.py:366(getAvailableActions)(10) 0.017
search.py:272(search) search.py:126(search)(6972) 1.257
Page.py:199(_text_filename) Page.py:272(lastEditInfo)(10) 0.016
Page.py:299(isWritable)(10) 0.005
Page.py:370(size)(10) 0.006
Page.py:1266(getACL)(6580) 6.529
wikidicts.py:300(scandicts) request.py:556(initdicts)(10) 1.057
patch 460 + experinamtal refactoring
ab -n 11 -c 1 'http://localhost:8000/HelpOnConfiguration/EmailSupport?action=fullsearch&context=180&value=help+config&titlesearch=Titles'
Requests per second: 2.05 [#/sec] (mean)
233562 function calls in 8.219 CPU seconds
Ordered by: internal time, call count
List reduced from 262 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
25730 1.234 0.000 1.234 0.000 posixpath.py:56(join)
20 1.203 0.060 7.727 0.386 Page.py:1337(listPages)
20110 1.092 0.000 1.151 0.000 Page.py:24(Page)
6650 1.052 0.000 1.765 0.000 security.py:52(<lambda>)
12360 0.772 0.000 3.032 0.000 Page.py:185(getInfoForDomain)
18970 0.682 0.000 0.682 0.000 posixpath.py:171(exists)
6730 0.371 0.000 0.443 0.000 wikiutil.py:187(unquoteWikiname)
6600 0.303 0.000 0.303 0.000 wikiutil.py:154(quoteWikinameFS)
6650 0.279 0.000 0.442 0.000 wikiacl.py:185(may)
6460 0.156 0.000 0.167 0.000 search.py:121(sortByCost)
6670 0.137 0.000 0.137 0.000 posixpath.py:144(getmtime)
6650 0.102 0.000 0.249 0.000 Page.py:1287(getACL)
13810 0.086 0.000 3.118 0.000 Page.py:169(getInfo)
6770 0.072 0.000 0.072 0.000 wikiutil.py:56(decodeUserInput)
6650 0.065 0.000 0.065 0.000 security.py:45(__getattr__)
5300 0.061 0.000 0.076 0.000 wikidicts.py:271(has_member)
6610 0.059 0.000 0.059 0.000 Page.py:37(__init__)
6972 0.058 0.000 0.059 0.000 search.py:272(search)
10 0.049 0.005 0.056 0.006 wikidicts.py:300(scandicts)
7060 0.045 0.000 3.152 0.000 Page.py:345(exists)
Ordered by: internal time, call count
List reduced from 262 to 20 due to restriction <20>
Function was called by...
posixpath.py:56(join) Page.py:185(getInfoForDomain)(25590) 3.032
Page.py:435(getPageList)(10) 7.730
Page.py:530(getEditLogPath)(20) 0.000
Page.py:536(getAttachmentPath)(10) 0.000
Page.py:542(getPagesPath)(10) 0.000
caching.py:13(__init__)(10) 0.001
caching.py:34(_filename)(10) 0.000
multiconfig.py:267(__init__)(30) 0.004
wikiaction.py:836(getPlugins)(40) 0.006
Page.py:1337(listPages) Page.py:435(getPageList)(20) 7.730
Page.py:24(Page) AttachFile.py:50(getAttachDir)(10) 0.000
Page.py:1273(getParentPage)(20) 0.001
Page.py:1337(listPages)(6710) 7.727
request.py:64(__init__)(10) 0.022
request.py:669(run)(10) 8.194
search.py:945(searchPages)(6460) 8.022
security.py:52(<lambda>)(6650) 1.765
text_html.py:212(pagelink)(80) 0.010
wikiutil.py:432(getSysPage)(150) 0.012
wikiutil.py:909(send_title)(10) 0.063
security.py:52(<lambda>) Page.py:1337(listPages)(6600) 7.727
__init__.py:490(shouldShowPageinfo)(10) 0.002
__init__.py:752(shouldShowEditbar)(20) 0.003
__init__.py:912(editbar)(10) 0.018
request.py:365(getAvailableActions)(10) 0.007
Page.py:185(getInfoForDomain) Page.py:169(getInfo)(12360) 3.118
posixpath.py:171(exists) Page.py:185(getInfoForDomain)(18960) 3.032
Page.py:242(_last_edited)(10) 0.001
wikiutil.py:187(unquoteWikiname) Page.py:1337(listPages)(6730) 7.727
wikiutil.py:154(quoteWikinameFS) Page.py:105(getStorageName)(6600) 0.346
wikiacl.py:185(may) security.py:52(<lambda>)(6650) 1.765
search.py:121(sortByCost) search.py:126(search)(6460) 0.258
posixpath.py:144(getmtime) Page.py:289(lastEditInfo)(10) 0.002
Page.py:1287(getACL)(6650) 0.249
logfile.py:160(date)(10) 0.000
Page.py:1287(getACL) security.py:52(<lambda>)(6650) 1.765
Page.py:169(getInfo) Page.py:217(_text_filename)(20) 0.000
Page.py:316(isWritable)(10) 0.000
Page.py:329(isUnderlayPage)(10) 0.000
Page.py:337(isStandardPage)(10) 0.000
Page.py:345(exists)(7060) 3.152
Page.py:375(size)(10) 0.001
Page.py:530(getEditLogPath)(20) 0.000
Page.py:536(getAttachmentPath)(10) 0.000
Page.py:542(getPagesPath)(10) 0.000
Page.py:1287(getACL)(6650) 0.249
wikiutil.py:56(decodeUserInput) request.py:581(_setup_args_from_cgi_form)(40) 0.001
wikiutil.py:187(unquoteWikiname)(6730) 0.443
security.py:45(__getattr__) Page.py:1337(listPages)(6600) 7.727
__init__.py:490(shouldShowPageinfo)(10) 0.002
__init__.py:752(shouldShowEditbar)(20) 0.003
__init__.py:912(editbar)(10) 0.018
request.py:365(getAvailableActions)(10) 0.007
wikidicts.py:271(has_member) wikiacl.py:185(may)(5300) 0.442
Page.py:37(__init__) Page.py:24(Page)(6610) 1.151
search.py:272(search) search.py:126(search)(6972) 0.258
wikidicts.py:300(scandicts) request.py:555(initdicts)(10) 0.057
Page.py:345(exists) Page.py:289(lastEditInfo)(10) 0.002
Page.py:590(link_to)(150) 0.014
Page.py:1273(getParentPage)(20) 0.001
Page.py:1337(listPages)(6710) 7.727
__init__.py:490(shouldShowPageinfo)(10) 0.002
__init__.py:752(shouldShowEditbar)(20) 0.003
request.py:365(getAvailableActions)(10) 0.007
wikiutil.py:432(getSysPage)(130) 0.012
patch-468
ab -n 11 -c 1 'http://localhost:8000/HelpOnConfiguration/EmailSupport?action=fullsearch&context=180&value=help+config&titlesearch=Titles'
Requests per second: 1.33 [#/sec] (mean)
372660 function calls (359950 primitive calls) in 13.759 CPU seconds
Ordered by: internal time, call count
List reduced from 232 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
19460 3.588 0.000 3.729 0.000 Page.py:89(get_current_from_pagedir)
19460 1.326 0.000 2.683 0.000 Page.py:105(get_rev_dir)
20240 1.171 0.000 6.525 0.000 Page.py:241(getPageStatus)
6460 1.164 0.000 1.175 0.000 search.py:121(sortByCost)
6580 1.114 0.000 7.926 0.001 security.py:52(<lambda>)
13420 1.087 0.000 2.374 0.000 Page.py:272(getPagePath)
26110 0.712 0.000 0.712 0.000 posixpath.py:171(exists)
79270 0.597 0.000 0.597 0.000 posixpath.py:56(join)
13320 0.532 0.000 0.532 0.000 wikiutil.py:154(quoteWikinameFS)
6540 0.371 0.000 0.447 0.000 wikiutil.py:187(unquoteWikiname)
6580 0.294 0.000 0.459 0.000 wikiacl.py:185(may)
19660/6950 0.237 0.000 5.294 0.001 Page.py:122(get_rev)
13320 0.209 0.000 3.220 0.000 Page.py:62(reset)
20 0.204 0.010 9.563 0.478 Page.py:1418(listPages)
13320 0.138 0.000 3.358 0.000 Page.py:26(__init__)
20240 0.128 0.000 5.238 0.000 Page.py:176(getPageBasePath)
6580 0.122 0.000 5.600 0.001 Page.py:1368(getACL)
6600 0.115 0.000 0.115 0.000 posixpath.py:144(getmtime)
6580 0.077 0.000 0.077 0.000 wikiutil.py:56(decodeUserInput)
5280 0.067 0.000 0.078 0.000 wikidicts.py:271(has_member)
Ordered by: internal time, call count
List reduced from 232 to 20 due to restriction <20>
Function was called by...
Page.py:89(get_current_from_pagedir) Page.py:105(get_rev_dir)(6730) 2.683
Page.py:122(get_rev)(12730) 5.294
Page.py:105(get_rev_dir) Page.py:122(get_rev)(12730) 5.294
Page.py:1418(listPages)(6730) 9.563
Page.py:241(getPageStatus) Page.py:122(get_rev)(6820) 5.294
Page.py:272(getPagePath)(13420) 2.374
search.py:121(sortByCost) search.py:126(search)(6460) 1.269
security.py:52(<lambda>) Page.py:1418(listPages)(6530) 9.563
__init__.py:488(shouldShowPageinfo)(10) 0.007
__init__.py:750(shouldShowEditbar)(20) 0.014
__init__.py:910(editbar)(10) 0.046
request.py:366(getAvailableActions)(10) 0.014
Page.py:272(getPagePath) AttachFile.py:50(getAttachDir)(10) 0.006
Page.py:62(reset)(13320) 3.220
Page.py:325(_last_edited)(10) 0.002
Page.py:429(exists)(50) 0.088
Page.py:530(getPageList)(20) 9.566
editlog.py:74(__init__)(10) 0.001
posixpath.py:171(exists) Page.py:105(get_rev_dir)(19460) 2.683
Page.py:241(getPageStatus)(20) 6.525
Page.py:429(exists)(50) 0.088
Page.py:1368(getACL)(6580) 5.600
posixpath.py:56(join) Page.py:62(reset)(13320) 3.220
Page.py:89(get_current_from_pagedir)(19460) 3.729
Page.py:105(get_rev_dir)(19460) 2.683
Page.py:241(getPageStatus)(20240) 6.525
Page.py:1418(listPages)(6730) 9.563
caching.py:13(__init__)(10) 0.001
caching.py:34(_filename)(10) 0.000
wikiaction.py:836(getPlugins)(40) 0.006
wikiutil.py:154(quoteWikinameFS) Page.py:62(reset)(13320) 3.220
wikiutil.py:187(unquoteWikiname) Page.py:1418(listPages)(6540) 9.563
wikiacl.py:185(may) security.py:52(<lambda>)(6580) 7.926
Page.py:122(get_rev) Page.py:176(getPageBasePath)(12730) 5.238
Page.py:296(_text_filename)(6610) 5.257
Page.py:429(exists)(320) 0.088
Page.py:62(reset) Page.py:26(__init__)(13320) 3.358
Page.py:1418(listPages) Page.py:530(getPageList)(20) 9.566
Page.py:26(__init__) AttachFile.py:50(getAttachDir)(10) 0.006
Page.py:1354(getParentPage)(20) 0.009
request.py:670(run)(10) 13.759
search.py:945(searchPages)(6460) 13.454
security.py:52(<lambda>)(6580) 7.926
text_html.py:212(pagelink)(80) 0.052
wikiutil.py:432(getSysPage)(150) 0.076
wikiutil.py:909(send_title)(10) 0.169
Page.py:176(getPageBasePath) Page.py:241(getPageStatus)(20240) 6.525
Page.py:1368(getACL) security.py:52(<lambda>)(6580) 7.926
posixpath.py:144(getmtime) Page.py:369(lastEditInfo)(10) 0.003
Page.py:1368(getACL)(6580) 5.600
logfile.py:160(date)(10) 0.000
wikiutil.py:56(decodeUserInput) request.py:582(_setup_args_from_cgi_form)(40) 0.001
wikiutil.py:187(unquoteWikiname)(6540) 0.447
wikidicts.py:271(has_member) wikiacl.py:185(may)(5280) 0.459