summaryrefslogtreecommitdiff
path: root/doc/recentchanges/change_f35f79a0b831e8b47f62c430c1bba538d4687521._change
blob: c0a50712cf971de3d75d384b98105eac1ad4e2ab (plain)
  1. [[!meta author="""http://kerravonsen.dreamwidth.org/"""]]
  2. [[!meta authorurl="""http://kerravonsen.dreamwidth.org/"""]]
  3. [[!meta title="""change to todo/Improving_the_efficiency_of_match__95__glob on ikiwiki"""]]
  4. [[!meta permalink="http://ikiwiki.info/recentchanges/#change-f35f79a0b831e8b47f62c430c1bba538d4687521"]]
  5. <div id="change-f35f79a0b831e8b47f62c430c1bba538d4687521" class="metadata">
  6. <span class="desc"><br />Changed pages:</span>
  7. <span class="pagelinks">
  8. <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>
  9. </span>
  10. <span class="desc"><br />Changed by:</span>
  11. <span class="committer">
  12. <a href="http://kerravonsen.dreamwidth.org/" rel="nofollow">kerravonsen [dreamwidth.org]</a>
  13. </span>
  14. <span class="desc"><br />Commit type:</span>
  15. <span class="committype">web</span>
  16. <span class="desc"><br />Date:</span>
  17. <span class="changedate"><span class="relativedate" title="Wed, 10 Nov 2010 17:08:45 -0400">17:08:45 11/10/10</span></span>
  18. <span class="desc"><br /></span>
  19. </div>
  20. <span class="revert">
  21. <a href="http://ikiwiki.info/ikiwiki.cgi?rev=f35f79a0b831e8b47f62c430c1bba538d4687521&amp;do=revert" title="revert" rel="nofollow">[[revert|wikiicons/revert.png]]</a>
  22. </span>
  23. <div class="changelog">
  24. response with benchmark<br />
  25. </div>
  26. <div class="diff">
  27. <pre>
  28. diff --git a/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn b/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn
  29. index b631287..ff9784d 100644
  30. --- a/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn
  31. +++ b/doc/todo/Improving_the_efficiency_of_match__95__glob.mdwn
  32. @@ -9,6 +9,47 @@ Here&#39;s my patch - please consider it! -- &#91;&#91;KathrynAndersen&#93;&#93;
  33. &gt;&gt; I think so, yeah. Anyway, do you have any benchmark results handy,
  34. &gt;&gt; Kathryn? --&#91;&#91;Joey&#93;&#93;
  35. +&gt;&gt;&gt; See below.
  36. +&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
  37. + $foo =~ /^$re$/i
  38. +&gt;&gt;&gt; rather than /$re/ so I think that would make sense.
  39. +&gt;&gt;&gt; -- &#91;&#91;KathrynAndersen&#93;&#93;
  40. +
  41. +--------------------------------------------------------------
  42. +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.
  43. +
  44. +Before:
  45. +&lt;pre&gt;
  46. +time elapsed (wall): 27.4173
  47. +time running program: 22.5909 (82.40%)
  48. +time profiling (est.): 4.8264 (17.60%)
  49. +number of calls: 1314729
  50. +number of exceptions: 65
  51. +
  52. +%Time Sec. #calls sec/call F name
  53. +11.05 2.4969 62333 0.000040 IkiWiki::PageSpec::match_glob
  54. + 4.10 0.9261 679 0.001364 Text::Balanced::_match_tagged
  55. + 2.72 0.6139 59812 0.000010 IkiWiki::SuccessReason::merge_influences
  56. +&lt;/pre&gt;
  57. +
  58. +After:
  59. +&lt;pre&gt;
  60. +time elapsed (wall): 26.1843
  61. +time running program: 21.5673 (82.37%)
  62. +time profiling (est.): 4.6170 (17.63%)
  63. +number of calls: 1252433
  64. +number of exceptions: 65
  65. +
  66. +%Time Sec. #calls sec/call F name
  67. + 7.66 1.6521 62333 0.000027 IkiWiki::PageSpec::match_glob
  68. + 4.33 0.9336 679 0.001375 Text::Balanced::_match_tagged
  69. + 2.81 0.6057 59812 0.000010 IkiWiki::SuccessReason::merge_influences
  70. +&lt;/pre&gt;
  71. +
  72. +Note that the seconds per call for match_glob in the &quot;after&quot; case has gone down by about a third.
  73. +
  74. +K.A.
  75. +
  76. --------------------------------------------------------------
  77. &lt;pre&gt;
  78. diff --git a/IkiWiki.pm b/IkiWiki.pm
  79. </pre>
  80. </div>
  81. <!-- f35f79a0b831e8b47f62c430c1bba538d4687521 -->