Here are profiles for CGI, using different moin versions.

All profiles use one request for typical page: WhyWikiWorks from moin-1.3.1, using Python 2.4 on Mac OS X 10.3.

Release 1.2.4

         8957 function calls (8840 primitive calls) in 0.360 CPU seconds

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

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.143    0.143 request.py:498(__init__)
        1    0.021    0.021    0.143    0.143 request.py:57(__init__)
        1    0.020    0.020    0.112    0.112 request.py:323(run)
        1    0.034    0.034    0.105    0.105 request.py:8(?)
        1    0.013    0.013    0.084    0.084 Page.py:385(send_page)
        1    0.016    0.016    0.068    0.068 wikiutil.py:7(?)
        2    0.002    0.001    0.056    0.028 user.py:119(__init__)
        2    0.024    0.012    0.054    0.027 security.py:29(__init__)
       11    0.000    0.000    0.052    0.005 wikiutil.py:495(importPlugin)
    24/22    0.039    0.002    0.052    0.002 pysupport.py:37(importName)
        1    0.011    0.011    0.030    0.030 user.py:7(?)
        1    0.009    0.009    0.030    0.030 Page.py:7(?)
        1    0.006    0.006    0.027    0.027 urllib.py:23(?)
        1    0.015    0.015    0.026    0.026 wikiutil.py:846(send_title)
        1    0.008    0.008    0.017    0.017 request.py:220(initdicts)
        1    0.013    0.013    0.015    0.015 eventlog.py:5(?)
        1    0.012    0.012    0.015    0.015 socket.py:43(?)
      140    0.000    0.000    0.012    0.000 sre.py:213(_compile)
       16    0.000    0.000    0.012    0.001 sre_compile.py:490(compile)
       24    0.000    0.000    0.012    0.001 sre.py:178(compile)
        1    0.008    0.008    0.012    0.012 Cookie.py:211(?)
        1    0.010    0.010    0.012    0.012 wiki.py:7(?)
        1    0.001    0.001    0.012    0.012 difflib.py:29(?)
        1    0.008    0.008    0.010    0.010 heapq.py:31(?)
        1    0.000    0.000    0.009    0.009 wikidicts.py:233(scandicts)
    17/16    0.000    0.000    0.009    0.001 sre_parse.py:655(parse)
    33/17    0.000    0.000    0.008    0.000 sre_parse.py:301(_parse_sub)
        1    0.000    0.000    0.008    0.008 pickle.py:1389(load)
    40/17    0.003    0.000    0.008    0.000 sre_parse.py:374(_parse)
        1    0.004    0.004    0.008    0.008 pickle.py:859(load)
        1    0.002    0.002    0.008    0.008 re.py:1(?)
        1    0.002    0.002    0.007    0.007 request.py:511(open_logs)
        1    0.006    0.006    0.007    0.007 pickle.py:25(?)
        1    0.004    0.004    0.006    0.006 sre.py:94(?)
        1    0.002    0.002    0.006    0.006 cgi.py:16(?)
        1    0.003    0.003    0.006    0.006 string.py:20(?)
        1    0.000    0.000    0.005    0.005 Page.py:657(send_page_content)
        3    0.000    0.000    0.004    0.001 security.py:89(getACL)
        2    0.000    0.000    0.004    0.002 security.py:45(edit)
        3    0.004    0.001    0.004    0.001 Page.py:839(getACL)

Release 1.3.0

         33109 function calls (32621 primitive calls) in 0.433 CPU seconds

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

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.213    0.213 request.py:654(run)
        1    0.014    0.014    0.205    0.205 Page.py:650(send_page)
        1    0.007    0.007    0.138    0.138 request.py:8(?)
        1    0.014    0.014    0.132    0.132 wikiutil.py:902(send_title)
       26    0.050    0.002    0.096    0.004 pysupport.py:37(importName)
       12    0.000    0.000    0.096    0.008 wikiutil.py:508(importPlugin)
        1    0.000    0.000    0.083    0.083 request.py:1034(__init__)
        1    0.008    0.008    0.077    0.077 wikiutil.py:7(?)
        1    0.000    0.000    0.074    0.074 modern.py:38(header)
        2    0.000    0.000    0.072    0.036 __init__.py:910(editbar)
        2    0.000    0.000    0.071    0.035 Page.py:958(canUseCache)
        1    0.028    0.028    0.071    0.071 request.py:63(__init__)
      157    0.000    0.000    0.051    0.000 sre.py:213(_compile)
       21    0.000    0.000    0.051    0.002 sre_compile.py:490(compile)
       38    0.000    0.000    0.049    0.001 sre.py:178(compile)
        1    0.011    0.011    0.044    0.044 wiki.py:7(?)
        1    0.000    0.000    0.044    0.044 Page.py:982(send_page_content)
        7    0.000    0.000    0.034    0.005 security.py:52(<lambda>)
        1    0.001    0.001    0.034    0.034 WhyWikiWorks:2(?)
        1    0.032    0.032    0.033    0.033 wikimacro.py:13(?)
        1    0.012    0.012    0.031    0.031 user.py:7(?)
        1    0.007    0.007    0.028    0.028 urllib.py:23(?)
    22/21    0.000    0.000    0.027    0.001 sre_parse.py:655(parse)
    41/22    0.001    0.000    0.027    0.001 sre_parse.py:301(_parse_sub)
        7    0.000    0.000    0.026    0.004 wikiacl.py:185(may)
        7    0.000    0.000    0.026    0.004 request.py:133(__getattr__)
        1    0.006    0.006    0.026    0.026 request.py:540(initdicts)
       66    0.001    0.000    0.026    0.000 Page.py:550(link_to)
       60    0.001    0.000    0.026    0.000 text_html.py:212(pagelink)
    78/50    0.009    0.000    0.026    0.001 sre_parse.py:374(_parse)
   267/98    0.016    0.000    0.023    0.000 Page.py:77(get_rev)
       21    0.000    0.000    0.023    0.001 sre_compile.py:475(_code)
        1    0.003    0.003    0.022    0.022 config.py:3(?)
       77    0.002    0.000    0.022    0.000 Page.py:320(exists)
        2    0.000    0.000    0.020    0.010 pickle.py:1392(loads)
        2    0.009    0.004    0.020    0.010 pickle.py:859(load)
       31    0.000    0.000    0.019    0.001 sre_compile.py:173(_compile_charset)
   196/99    0.004    0.000    0.019    0.000 Page.py:108(getPagePath)
        1    0.005    0.005    0.019    0.019 Page.py:7(?)
       31    0.005    0.000    0.019    0.001 sre_compile.py:202(_optimize_charset)

Release 1.3.1

         16628 function calls (16142 primitive calls) in 0.424 CPU seconds

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

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.184    0.184 request.py:654(run)
        1    0.014    0.014    0.175    0.175 Page.py:650(send_page)
        1    0.008    0.008    0.127    0.127 request.py:8(?)
        1    0.014    0.014    0.115    0.115 wikiutil.py:909(send_title)
        1    0.000    0.000    0.113    0.113 request.py:1034(__init__)
       26    0.048    0.002    0.101    0.004 pysupport.py:37(importName)
       12    0.000    0.000    0.101    0.008 wikiutil.py:515(importPlugin)
        1    0.034    0.034    0.100    0.100 request.py:63(__init__)
        1    0.008    0.008    0.076    0.076 wikiutil.py:7(?)
        1    0.000    0.000    0.075    0.075 modern.py:38(header)
        2    0.000    0.000    0.074    0.037 __init__.py:910(editbar)
        2    0.000    0.000    0.071    0.036 Page.py:958(canUseCache)
       41    0.000    0.000    0.052    0.001 sre.py:213(_compile)
       20    0.000    0.000    0.052    0.003 sre_compile.py:490(compile)
       38    0.000    0.000    0.050    0.001 sre.py:178(compile)
        1    0.011    0.011    0.046    0.046 wiki.py:7(?)
        1    0.034    0.034    0.035    0.035 wikimacro.py:13(?)
        1    0.000    0.000    0.030    0.030 Page.py:982(send_page_content)
        1    0.009    0.009    0.029    0.029 Page.py:7(?)
        1    0.001    0.001    0.028    0.028 WhyWikiWorks:2(?)
    21/20    0.000    0.000    0.028    0.001 sre_parse.py:655(parse)
    40/21    0.001    0.000    0.028    0.001 sre_parse.py:301(_parse_sub)
   267/98    0.021    0.000    0.028    0.000 Page.py:77(get_rev)
    77/49    0.009    0.000    0.027    0.001 sre_parse.py:374(_parse)
        1    0.006    0.006    0.027    0.027 urllib.py:23(?)
       77    0.001    0.000    0.025    0.000 Page.py:320(exists)
        1    0.000    0.000    0.024    0.024 request.py:259(loadTheme)
       20    0.000    0.000    0.023    0.001 sre_compile.py:475(_code)
        7    0.000    0.000    0.023    0.003 security.py:52(<lambda>)
        1    0.003    0.003    0.022    0.022 config.py:3(?)
       66    0.001    0.000    0.022    0.000 Page.py:550(link_to)
       60    0.001    0.000    0.022    0.000 text_html.py:212(pagelink)
        1    0.009    0.009    0.021    0.021 user.py:7(?)
       28    0.000    0.000    0.019    0.001 sre_compile.py:173(_compile_charset)
       28    0.005    0.000    0.019    0.001 sre_compile.py:202(_optimize_charset)
   196/99    0.004    0.000    0.019    0.000 Page.py:108(getPagePath)
   106/20    0.002    0.000    0.016    0.001 sre_compile.py:27(_compile)
        1    0.013    0.013    0.015    0.015 eventlog.py:5(?)
        1    0.012    0.012    0.015    0.015 socket.py:43(?)
        4    0.012    0.003    0.014    0.003 sre_compile.py:296(_optimize_unicode)

Patch 515

         24511 function calls (24160 primitive calls) in 0.427 CPU seconds

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

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.196    0.196 request.py:670(run)
        1    0.014    0.014    0.184    0.184 Page.py:767(send_page)
        1    0.000    0.000    0.133    0.133 request.py:1070(__init__)
        1    0.038    0.038    0.114    0.114 request.py:64(__init__)
        1    0.008    0.008    0.099    0.099 request.py:8(?)
       17    0.046    0.003    0.075    0.004 pysupport.py:40(importName)
       11    0.000    0.000    0.075    0.007 wikiutil.py:538(importPlugin)
      105    0.000    0.000    0.071    0.001 sre.py:213(_compile)
       21    0.000    0.000    0.070    0.003 sre_compile.py:490(compile)
      102    0.000    0.000    0.069    0.001 sre.py:178(compile)
        1    0.014    0.014    0.062    0.062 wikiutil.py:977(send_title)
        1    0.012    0.012    0.048    0.048 Page.py:7(?)
        1    0.004    0.004    0.043    0.043 wikiutil.py:7(?)
    22/21    0.000    0.000    0.039    0.002 sre_parse.py:655(parse)
    45/22    0.001    0.000    0.039    0.002 sre_parse.py:301(_parse_sub)
        1    0.000    0.000    0.038    0.038 modern.py:18(header)
    88/52    0.011    0.000    0.038    0.001 sre_parse.py:374(_parse)
        2    0.000    0.000    0.034    0.017 __init__.py:921(editbar)
       21    0.000    0.000    0.031    0.001 sre_compile.py:475(_code)
        1    0.011    0.011    0.028    0.028 wiki.py:7(?)
       29    0.000    0.000    0.026    0.001 sre_compile.py:173(_compile_charset)
       29    0.007    0.000    0.026    0.001 sre_compile.py:202(_optimize_charset)
        1    0.007    0.007    0.024    0.024 user.py:7(?)
   120/21    0.002    0.000    0.024    0.001 sre_compile.py:27(_compile)
        1    0.000    0.000    0.024    0.024 Page.py:1099(send_page_content)
        1    0.003    0.003    0.022    0.022 config.py:3(?)
        1    0.001    0.001    0.022    0.022 WhyWikiWorks:2(?)
       74    0.004    0.000    0.022    0.000 Page.py:278(split_title)
        1    0.004    0.004    0.022    0.022 urllib.py:23(?)
        1    0.000    0.000    0.019    0.019 request.py:188(_setup_vars_from_std_env)
        2    0.012    0.006    0.019    0.010 request.py:147(_load_multi_cfg)
       73    0.001    0.000    0.019    0.000 Page.py:667(link_to)
        1    0.000    0.000    0.019    0.019 request.py:266(loadTheme)
        1    0.000    0.000    0.019    0.019 __init__.py:804(actionsMenu)
        6    0.016    0.003    0.019    0.003 sre_compile.py:296(_optimize_unicode)
        1    0.000    0.000    0.019    0.019 request.py:360(getAvailableActions)
        1    0.018    0.018    0.018    0.018 request.py:330(getKnownActions)
       60    0.001    0.000    0.017    0.000 text_html.py:212(pagelink)
        1    0.014    0.014    0.017    0.017 socket.py:43(?)
        1    0.016    0.016    0.017    0.017 wikimacro.py:13(?)

Patch-538+ page state caching

         23726 function calls (23468 primitive calls) in 0.405 CPU seconds

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

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.184    0.184 request.py:674(run)
        1    0.015    0.015    0.172    0.172 Page.py:944(send_page)
        1    0.000    0.000    0.123    0.123 request.py:1074(__init__)
        1    0.039    0.039    0.103    0.103 request.py:64(__init__)
        1    0.008    0.008    0.098    0.098 request.py:8(?)
       17    0.045    0.003    0.077    0.005 pysupport.py:40(importName)
       11    0.000    0.000    0.076    0.007 wikiutil.py:539(importPlugin)
      105    0.000    0.000    0.071    0.001 sre.py:213(_compile)
       21    0.000    0.000    0.071    0.003 sre_compile.py:490(compile)
      104    0.000    0.000    0.070    0.001 sre.py:178(compile)
        1    0.013    0.013    0.057    0.057 wikiutil.py:978(send_title)
        1    0.004    0.004    0.043    0.043 wikiutil.py:7(?)
    22/21    0.000    0.000    0.039    0.002 sre_parse.py:655(parse)
    45/22    0.001    0.000    0.038    0.002 sre_parse.py:301(_parse_sub)
    88/52    0.012    0.000    0.038    0.001 sre_parse.py:374(_parse)
        1    0.010    0.010    0.037    0.037 Page.py:7(?)
        1    0.000    0.000    0.036    0.036 modern.py:18(header)
        2    0.000    0.000    0.033    0.016 __init__.py:925(editbar)
       21    0.000    0.000    0.032    0.002 sre_compile.py:475(_code)
        1    0.012    0.012    0.030    0.030 wiki.py:7(?)
       29    0.000    0.000    0.027    0.001 sre_compile.py:173(_compile_charset)
       29    0.006    0.000    0.027    0.001 sre_compile.py:202(_optimize_charset)
   120/21    0.002    0.000    0.025    0.001 sre_compile.py:27(_compile)
        1    0.008    0.008    0.025    0.025 user.py:7(?)
       74    0.004    0.000    0.022    0.000 Page.py:292(split_title)
        1    0.003    0.003    0.022    0.022 config.py:3(?)
        6    0.017    0.003    0.020    0.003 sre_compile.py:296(_optimize_unicode)
        1    0.000    0.000    0.020    0.020 request.py:194(_setup_vars_from_std_env)
        2    0.012    0.006    0.020    0.010 request.py:153(_load_multi_cfg)
        1    0.000    0.000    0.019    0.019 request.py:272(loadTheme)
        1    0.000    0.000    0.018    0.018 __init__.py:808(actionsMenu)
        1    0.018    0.018    0.018    0.018 wikimacro.py:13(?)
        1    0.000    0.000    0.018    0.018 request.py:366(getAvailableActions)
        1    0.018    0.018    0.018    0.018 request.py:336(getKnownActions)
     4788    0.012    0.000    0.016    0.000 sre_parse.py:201(get)
        3    0.000    0.000    0.014    0.005 Page.py:580(userMay)
        2    0.000    0.000    0.014    0.007 __init__.py:761(shouldShowEditbar)
        1    0.000    0.000    0.014    0.014 Page.py:1276(send_page_content)
        1    0.003    0.003    0.013    0.013 urllib.py:23(?)
        1    0.002    0.002    0.013    0.013 WhyWikiWorks:2(?)

MoinMoin: MoinProfiling/CgiProfiles (last edited 2007-10-29 19:08:14 by localhost)