]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/recentchanges/change_f35f79a0b831e8b47f62c430c1bba538d4687521._change
(no commit message)
[git.ikiwiki.info.git] / doc / recentchanges / change_f35f79a0b831e8b47f62c430c1bba538d4687521._change
1 [[!meta author="""http://kerravonsen.dreamwidth.org/"""]]
3 [[!meta authorurl="""http://kerravonsen.dreamwidth.org/"""]]
5 [[!meta title="""change to todo/Improving_the_efficiency_of_match__95__glob on ikiwiki"""]]
7 [[!meta permalink="http://ikiwiki.info/recentchanges/#change-f35f79a0b831e8b47f62c430c1bba538d4687521"]]
9 <div id="change-f35f79a0b831e8b47f62c430c1bba538d4687521" class="metadata">
10 <span class="desc"><br />Changed pages:</span>
11 <span class="pagelinks">
13 <a href="http://git.ikiwiki.info/?p=ikiwiki;a=blobdiff;f=doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn;h=ff9784dd163c255867ba9958827447472fb20350;hp=b63128702d85c80ba625c217f9288660ac94ab7a;hb=f35f79a0b831e8b47f62c430c1bba538d4687521;hpb=08a20a3deaca2cb1f68fba993411b51c19e4c362" title="diff" rel="nofollow">[[diff|wikiicons/diff.png]]</a><a href="http://ikiwiki.info/ikiwiki.cgi?page=todo%2FImproving_the_efficiency_of_match__95__glob&amp;do=goto" rel="nofollow">todo/Improving the efficiency of match&#95;glob</a>
16 </span>
17 <span class="desc"><br />Changed by:</span>
18 <span class="committer">
20 <a href="http://kerravonsen.dreamwidth.org/" rel="nofollow">kerravonsen [dreamwidth.org]</a>
22 </span>
23 <span class="desc"><br />Commit type:</span>
24 <span class="committype">web</span>
25 <span class="desc"><br />Date:</span>
26 <span class="changedate"><span class="relativedate" title="Wed, 10 Nov 2010 17:08:45 -0400">17:08:45 11/10/10</span></span>
27 <span class="desc"><br /></span>
28 </div>
30 <span class="revert">
31 <a href="http://ikiwiki.info/ikiwiki.cgi?rev=f35f79a0b831e8b47f62c430c1bba538d4687521&amp;do=revert" title="revert" rel="nofollow">[[revert|wikiicons/revert.png]]</a>
32 </span>
34 <div class="changelog">
37 response with benchmark<br />
40 </div>
42 <div class="diff">
43 <pre>
44 diff --git a/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn b/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn
45 index b631287..ff9784d 100644
46 --- a/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn
47 +++ b/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn
48 @@ -9,6 +9,47 @@ Here&#39;s my patch - please consider it! -- &#91;&#91;KathrynAndersen&#93;&#93;
49  &gt;&gt; I think so, yeah. Anyway, do you have any benchmark results handy,
50  &gt;&gt; Kathryn?  --&#91;&#91;Joey&#93;&#93; 
51  
52 +&gt;&gt;&gt; See below.
53 +&gt;&gt;&gt; Also, would it make more sense for glob2re to return qr/^$re$/i rather than qr/$re/?  Everything that uses glob2re seems to use
54 +       $foo =~ /^$re$/i
55 +&gt;&gt;&gt; rather than /$re/ so I think that would make sense.
56 +&gt;&gt;&gt; -- &#91;&#91;KathrynAndersen&#93;&#93;
57 +
58 +--------------------------------------------------------------
59 +Benchmarks done with Devel::Profile on the same testbed IkiWiki setup.  I&#39;m just showing the start of the profile output, since that&#39;s what&#39;s relevant.
60 +
61 +Before:
62 +&lt;pre&gt;
63 +time elapsed (wall):   27.4173
64 +time running program:  22.5909  (82.40%)
65 +time profiling (est.): 4.8264  (17.60%)
66 +number of calls:       1314729
67 +number of exceptions:  65
68 +
69 +%Time    Sec.     #calls   sec/call  F  name
70 +11.05    2.4969    62333   0.000040     IkiWiki::PageSpec::match_glob
71 + 4.10    0.9261      679   0.001364     Text::Balanced::_match_tagged
72 + 2.72    0.6139    59812   0.000010     IkiWiki::SuccessReason::merge_influences
73 +&lt;/pre&gt;
74 +
75 +After:
76 +&lt;pre&gt;
77 +time elapsed (wall):   26.1843
78 +time running program:  21.5673  (82.37%)
79 +time profiling (est.): 4.6170  (17.63%)
80 +number of calls:       1252433
81 +number of exceptions:  65
82 +
83 +%Time    Sec.     #calls   sec/call  F  name
84 + 7.66    1.6521    62333   0.000027     IkiWiki::PageSpec::match_glob
85 + 4.33    0.9336      679   0.001375     Text::Balanced::_match_tagged
86 + 2.81    0.6057    59812   0.000010     IkiWiki::SuccessReason::merge_influences
87 +&lt;/pre&gt;
88 +
89 +Note that the seconds per call for match_glob in the &quot;after&quot; case has gone down by about a third.
90 +
91 +K.A.
92 +
93  --------------------------------------------------------------
94  &lt;pre&gt;
95  diff --git a/IkiWiki.pm b/IkiWiki.pm
97 </pre>
98 </div>
100 <!-- f35f79a0b831e8b47f62c430c1bba538d4687521 -->