Testing empty page, this shows the overhead of the wiki interface we have for every page view, search or any other action

This is a profile for empty page, which include only one processing instruction.

#language en

It does no include any page rendering, links etc. just the wiki header, title and footer. This is the general overhead we have for any request.

All profiles run

ab -n 101 -c 1 http://localhost:8000/EmptyPage

Using standalone.py from current code so we can compare profiles.

Release 1.3.0

Requests per second:    9.50 [#/sec] (mean)

         1084872 function calls (1074972 primitive calls) in 2.763 CPU seconds

   Ordered by: cumulative time, internal time, call count
   List reduced from 276 to 40 due to restriction <40>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    0.008    0.000    2.657    0.027 request.py:654(run)
      100    0.038    0.000    2.557    0.026 Page.py:650(send_page)
      100    0.025    0.000    2.127    0.021 wikiutil.py:902(send_title)
      800    0.011    0.000    1.556    0.002 security.py:52(<lambda>)
      800    0.003    0.000    1.472    0.002 wikiacl.py:185(may)
      700    0.006    0.000    1.466    0.002 request.py:133(__getattr__)
      100    0.004    0.000    1.460    0.015 request.py:540(initdicts)
      100    0.006    0.000    1.456    0.015 wikidicts.py:289(scandicts)
      100    0.030    0.000    1.439    0.014 pickle.py:1392(loads)
      100    0.525    0.005    1.408    0.014 pickle.py:859(load)
     8000    0.301    0.000    0.570    0.000 pickle.py:1221(load_setitems)
9200/4200    0.169    0.000    0.392    0.000 Page.py:77(get_rev)
      100    0.005    0.000    0.387    0.004 modern.py:38(header)
10000/5100    0.169    0.000    0.370    0.000 Page.py:108(getPagePath)
     2800    0.023    0.000    0.352    0.000 Page.py:320(exists)
    12100    0.274    0.000    0.274    0.000 pickle.py:884(marker)
     1300    0.031    0.000    0.237    0.000 wikiutil.py:432(getSysPage)
      800    0.188    0.000    0.215    0.000 pysupport.py:37(importName)
      200    0.007    0.000    0.200    0.001 __init__.py:910(editbar)
      300    0.006    0.000    0.168    0.001 wikiutil.py:508(importPlugin)
      100    0.004    0.000    0.140    0.001 __init__.py:282(navibar)
      400    0.005    0.000    0.121    0.000 __init__.py:205(splitNavilink)
      100    0.013    0.000    0.115    0.001 Page.py:982(send_page_content)
      100    0.001    0.000    0.111    0.001 wikiutil.py:1116(send_footer)
   117000    0.108    0.000    0.108    0.000 pickle.py:1193(load_long_binput)
      100    0.003    0.000    0.108    0.001 modern.py:70(footer)
      100    0.010    0.000    0.106    0.001 request.py:1370(__init__)
      200    0.010    0.000    0.094    0.000 Page.py:260(lastEditInfo)
      100    0.006    0.000    0.093    0.001 request.py:63(__init__)
     1200    0.004    0.000    0.090    0.000 Page.py:187(_text_filename)
      600    0.009    0.000    0.088    0.000 Page.py:550(link_to)
      100    0.003    0.000    0.079    0.001 __init__.py:510(pageinfo)
   350700    0.079    0.000    0.079    0.000 pickle.py:943(load_binint1)
      100    0.001    0.000    0.072    0.001 request.py:1477(finish)
      800    0.010    0.000    0.072    0.000 Page.py:1208(getACL)
      100    0.070    0.001    0.070    0.001 request.py:1014(finish)
      100    0.001    0.000    0.065    0.001 request.py:259(loadTheme)
    39800    0.064    0.000    0.064    0.000 posixpath.py:56(join)
      100    0.007    0.000    0.063    0.001 wiki.py:95(__init__)
      100    0.005    0.000    0.063    0.001 __init__.py:793(actionsMenu)

Release 1.3.1

Requests per second:    20.29 [#/sec] (mean)

         165152 function calls (155252 primitive calls) in 1.335 CPU seconds

   Ordered by: cumulative time, internal time, call count
   List reduced from 250 to 40 due to restriction <40>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    0.008    0.000    1.227    0.012 request.py:654(run)
      100    0.038    0.000    1.126    0.011 Page.py:650(send_page)
      100    0.025    0.000    0.706    0.007 wikiutil.py:909(send_title)
      100    0.005    0.000    0.400    0.004 modern.py:38(header)
9200/4200    0.171    0.000    0.395    0.000 Page.py:77(get_rev)
10000/5100    0.165    0.000    0.370    0.000 Page.py:108(getPagePath)
     2800    0.022    0.000    0.353    0.000 Page.py:320(exists)
     1300    0.032    0.000    0.248    0.000 wikiutil.py:432(getSysPage)
      800    0.191    0.000    0.218    0.000 pysupport.py:37(importName)
      200    0.007    0.000    0.201    0.001 __init__.py:910(editbar)
      300    0.006    0.000    0.170    0.001 wikiutil.py:515(importPlugin)
      100    0.004    0.000    0.141    0.001 __init__.py:282(navibar)
      800    0.011    0.000    0.129    0.000 security.py:52(<lambda>)
      400    0.005    0.000    0.122    0.000 __init__.py:205(splitNavilink)
      100    0.013    0.000    0.115    0.001 Page.py:982(send_page_content)
      100    0.010    0.000    0.107    0.001 request.py:1370(__init__)
      100    0.001    0.000    0.099    0.001 wikiutil.py:1123(send_footer)
      100    0.003    0.000    0.096    0.001 modern.py:70(footer)
      100    0.005    0.000    0.095    0.001 request.py:63(__init__)
      600    0.009    0.000    0.090    0.000 Page.py:550(link_to)
     1200    0.004    0.000    0.089    0.000 Page.py:187(_text_filename)
      200    0.010    0.000    0.082    0.000 Page.py:260(lastEditInfo)
      100    0.001    0.000    0.073    0.001 request.py:1479(finish)
      800    0.010    0.000    0.072    0.000 Page.py:1208(getACL)
      100    0.071    0.001    0.071    0.001 request.py:1014(finish)
      100    0.003    0.000    0.067    0.001 __init__.py:510(pageinfo)
      100    0.001    0.000    0.066    0.001 request.py:259(loadTheme)
      100    0.007    0.000    0.064    0.001 wiki.py:95(__init__)
      100    0.005    0.000    0.063    0.001 __init__.py:793(actionsMenu)
      100    0.001    0.000    0.057    0.001 wikimacro.py:33(getNames)
      100    0.001    0.000    0.056    0.001 wikiutil.py:565(getPlugins)
    39800    0.055    0.000    0.055    0.000 posixpath.py:56(join)
      100    0.001    0.000    0.055    0.001 wikiutil.py:550(extensionPlugins)
      200    0.001    0.000    0.054    0.000 Page.py:958(canUseCache)
      100    0.004    0.000    0.053    0.001 request.py:360(getAvailableActions)
      200    0.003    0.000    0.048    0.000 __init__.py:750(shouldShowEditbar)
    11300    0.048    0.000    0.048    0.000 posixpath.py:168(exists)
      200    0.007    0.000    0.046    0.000 Page.py:216(_last_edited)
      800    0.004    0.000    0.045    0.000 wikiacl.py:185(may)
      700    0.006    0.000    0.039    0.000 request.py:133(__getattr__)

patch-510

Requests per second:    28.43 [#/sec] (mean)

         131264 function calls (128164 primitive calls) in 1.049 CPU seconds

   Ordered by: cumulative time, internal time, call count
   List reduced from 252 to 40 due to restriction <40>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    0.008    0.000    0.999    0.010 request.py:670(run)
      100    0.039    0.000    0.894    0.009 Page.py:767(send_page)
      100    0.018    0.000    0.634    0.006 wikiutil.py:977(send_title)
      100    0.005    0.000    0.369    0.004 modern.py:18(header)
     1300    0.045    0.000    0.288    0.000 wikiutil.py:434(getSysPage)
     6000    0.036    0.000    0.259    0.000 Page.py:244(getPageStatus)
6700/3600    0.061    0.000    0.235    0.000 Page.py:123(get_rev)
      200    0.006    0.000    0.222    0.001 __init__.py:917(editbar)
     6000    0.031    0.000    0.214    0.000 Page.py:179(getPageBasePath)
     2800    0.019    0.000    0.214    0.000 Page.py:432(exists)
      700    0.012    0.000    0.185    0.000 security.py:52(<lambda>)
      200    0.003    0.000    0.124    0.001 __init__.py:757(shouldShowEditbar)
      100    0.004    0.000    0.106    0.001 __init__.py:280(navibar)
     2500    0.012    0.000    0.102    0.000 Page.py:26(__init__)
      400    0.004    0.000    0.096    0.000 __init__.py:203(splitNavilink)
      100    0.001    0.000    0.089    0.001 wikiutil.py:1206(send_footer)
     2500    0.042    0.000    0.089    0.000 Page.py:63(reset)
      100    0.003    0.000    0.087    0.001 modern.py:51(footer)
      700    0.005    0.000    0.085    0.000 wikiacl.py:185(may)
     3200    0.056    0.000    0.084    0.000 Page.py:106(get_rev_dir)
      700    0.005    0.000    0.078    0.000 request.py:140(__getattr__)
     3900    0.024    0.000    0.074    0.000 Page.py:275(getPagePath)
      100    0.004    0.000    0.073    0.001 request.py:550(initdicts)
      100    0.001    0.000    0.072    0.001 request.py:1530(finish)
      100    0.070    0.001    0.070    0.001 request.py:1050(finish)
      200    0.012    0.000    0.068    0.000 Page.py:372(lastEditInfo)
      100    0.055    0.001    0.068    0.001 wikidicts.py:300(scandicts)
      100    0.005    0.000    0.066    0.001 __init__.py:800(actionsMenu)
     3200    0.056    0.000    0.060    0.000 Page.py:90(get_current_from_pagedir)
     1100    0.003    0.000    0.060    0.000 Page.py:299(_text_filename)
      700    0.008    0.000    0.059    0.000 Page.py:1374(getACL)
      100    0.003    0.000    0.057    0.001 __init__.py:517(pageinfo)
      100    0.004    0.000    0.056    0.001 request.py:360(getAvailableActions)
      100    0.009    0.000    0.050    0.000 request.py:1413(__init__)
      200    0.006    0.000    0.044    0.000 Page.py:328(_last_edited)
      100    0.009    0.000    0.038    0.000 Page.py:1099(send_page_content)
      100    0.006    0.000    0.038    0.000 request.py:64(__init__)
      200    0.001    0.000    0.034    0.000 wikiutil.py:474(getFrontPage)
     5200    0.033    0.000    0.033    0.000 posixpath.py:168(exists)
      100    0.003    0.000    0.029    0.000 __init__.py:171(username)

patch-538 + page refactoring

See NirSoffer

Requests per second:    39.65 [#/sec] (mean)

         87764 function calls in 0.692 CPU seconds

   Ordered by: cumulative time, internal time, call count
   List reduced from 253 to 40 due to restriction <40>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    0.009    0.000    0.643    0.006 request.py:674(run)
      100    0.039    0.000    0.537    0.005 Page.py:944(send_page)
      100    0.012    0.000    0.330    0.003 wikiutil.py:978(send_title)
      100    0.005    0.000    0.241    0.002 modern.py:18(header)
      200    0.005    0.000    0.127    0.001 __init__.py:925(editbar)
      400    0.006    0.000    0.096    0.000 Page.py:580(userMay)
      200    0.001    0.000    0.090    0.000 __init__.py:761(shouldShowEditbar)
      300    0.002    0.000    0.087    0.000 wikiacl.py:185(may)
      700    0.006    0.000    0.086    0.000 request.py:146(__getattr__)
      100    0.004    0.000    0.081    0.001 request.py:554(initdicts)
      100    0.064    0.001    0.077    0.001 wikidicts.py:300(scandicts)
      100    0.001    0.000    0.075    0.001 request.py:1534(finish)
      100    0.073    0.001    0.073    0.001 request.py:1054(finish)
      100    0.004    0.000    0.073    0.001 __init__.py:280(navibar)
      200    0.010    0.000    0.067    0.000 Page.py:401(lastEditInfo)
      400    0.004    0.000    0.062    0.000 __init__.py:203(splitNavilink)
      600    0.008    0.000    0.061    0.000 Page.py:844(link_to)
     2300    0.005    0.000    0.049    0.000 Page.py:482(exists)
      100    0.009    0.000    0.049    0.000 request.py:1417(__init__)
      100    0.001    0.000    0.047    0.000 wikiutil.py:1207(send_footer)
      200    0.006    0.000    0.046    0.000 Page.py:357(_last_edited)
      100    0.003    0.000    0.045    0.000 modern.py:51(footer)
     3700    0.005    0.000    0.045    0.000 Page.py:147(getInfo)
     1300    0.028    0.000    0.044    0.000 wikiutil.py:436(getSysPage)
      100    0.003    0.000    0.040    0.000 __init__.py:517(pageinfo)
      100    0.008    0.000    0.040    0.000 Page.py:1276(send_page_content)
      100    0.006    0.000    0.037    0.000 request.py:64(__init__)
      900    0.013    0.000    0.036    0.000 Page.py:121(_getInfoFromDomain)
     1000    0.016    0.000    0.020    0.000 wikiutil.py:841(link_tag)
      200    0.005    0.000    0.020    0.000 logfile.py:282(to_end)
      800    0.014    0.000    0.020    0.000 Page.py:211(getPagePath)
      100    0.005    0.000    0.020    0.000 __init__.py:808(actionsMenu)
      100    0.003    0.000    0.019    0.000 __init__.py:171(username)
      100    0.003    0.000    0.018    0.000 request.py:1543(http_headers)
     3500    0.005    0.000    0.017    0.000 request.py:140(<lambda>)
      700    0.011    0.000    0.016    0.000 Page.py:87(_getInfoFromPage)
      300    0.013    0.000    0.015    0.000 logfile.py:104(__getattr__)
     1900    0.010    0.000    0.015    0.000 request.py:1526(write)
      100    0.003    0.000    0.015    0.000 eventlog.py:23(add)
      100    0.003    0.000    0.014    0.000 Page.py:769(get_raw_body)

Comparing with static files

As comparison - the best theoretical case we can have, cached html for the wiki elements. I saved the page as html and served it from the wiki directory:

ab -n 1000 -c 1 http://localhost:8000/wiki/EmptyPage.html

Serving with:

Standalone

Twisted

Medusa

Apache 2

Request per second:

94

259

437

1144

MoinMoin: MoinProfiling/EmptyPage (last edited 2007-10-29 19:11:47 by localhost)