Merge lp:~stub/launchpad/memcache into lp:launchpad

Proposed by Stuart Bishop
Status: Merged
Approved by: Stuart Bishop
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~stub/launchpad/memcache
Merge into: lp:launchpad
Diff against target: 79 lines (+14/-7)
2 files modified
lib/lp/code/templates/bazaar-index.pt (+10/-7)
utilities/page-performance-report.ini (+4/-0)
To merge this branch: bzr merge lp:~stub/launchpad/memcache
Reviewer Review Type Date Requested Status
Michael Nelson (community) code Approve
Review via email: mp+21130@code.launchpad.net

Commit message

Cache chunks of the Branches front page and update some hardcoded stats for 2010

Description of the change

Load chunks of the code frontpage from memcached. Currently this page consistently loads in 5-10 seconds. Once memcached is available for edge, we should see a significant improvement.

Also fix a drive by fix of Bug #536661 since I was editing the file.

To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Cool, I'm looking forward to finding places in soyuz to use the cache too!

With the abbreviations, is there any reason why we're not setting the title? Like:
<abbr title="Subversion">SVN</abbr>

Thanks stub.

review: Approve (code)
Revision history for this message
Stuart Bishop (stub) wrote :

Abbreviations with titles inside of <a> tags look sucky in the UI due to mouse over effects, so I'll leave that for now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/code/templates/bazaar-index.pt'
--- lib/lp/code/templates/bazaar-index.pt 2009-08-28 01:31:51 +0000
+++ lib/lp/code/templates/bazaar-index.pt 2010-03-11 11:53:27 +0000
@@ -47,13 +47,13 @@
47 # XXX mpt 20080222 bug=84913: This link should be changed to47 # XXX mpt 20080222 bug=84913: This link should be changed to
48 # the URL produced.48 # the URL produced.
49 </tal:XXX>49 </tal:XXX>
50 <a href="/+recently-imported-branches">over 100050 <a href="/+recently-imported-branches">over 2000
51 <abbr>CVS</abbr> and <abbr>SVN</abbr> projects</a>,51 <abbr>CVS</abbr>, <abbr>SVN</abbr>, Git and Mercurial projects</a>,
52 so you can use Bazaar with those too.52 so you can use Bazaar with those too.
53 (<a href="https://help.launchpad.net/Code">Read our guide</a>)53 (<a href="https://help.launchpad.net/Code">Read our guide</a>)
54 </p>54 </p>
5555
56 <div id="project-cloud-preview">56 <div id="project-cloud-preview" tal:content="cache:public,6 hours">
57 <h2>Projects with active branches</h2>57 <h2>Projects with active branches</h2>
58 <a tal:repeat="product view/short_product_tag_cloud"58 <a tal:repeat="product view/short_product_tag_cloud"
59 tal:attributes="href product/url;59 tal:attributes="href product/url;
@@ -64,7 +64,8 @@
64 </div>64 </div>
6565
66 <div class="columns">66 <div class="columns">
67 <div class="three column left" id="recent-imports">67 <div class="three column left" id="recent-imports"
68 tal:content="cache:private,15 minutes">
68 <h2>Recent imports</h2>69 <h2>Recent imports</h2>
69 <ul>70 <ul>
70 <li tal:repeat="branch view/recently_imported_branches">71 <li tal:repeat="branch view/recently_imported_branches">
@@ -78,7 +79,8 @@
78 </ul>79 </ul>
79 <p><a href="/+recently-imported-branches">more&#8230;</a></p>80 <p><a href="/+recently-imported-branches">more&#8230;</a></p>
80 </div>81 </div>
81 <div class="three column middle" id="recently-registered">82 <div class="three column middle" id="recently-registered"
83 tal:content="cache:private,3 minutes">
82 <h2>Recently registered</h2>84 <h2>Recently registered</h2>
83 <ul>85 <ul>
84 <li tal:repeat="branch view/recently_registered_branches">86 <li tal:repeat="branch view/recently_registered_branches">
@@ -92,7 +94,8 @@
92 </ul>94 </ul>
93 <p><a href="/+recently-registered-branches">more&#8230;</a></p>95 <p><a href="/+recently-registered-branches">more&#8230;</a></p>
94 </div>96 </div>
95 <div class="three column right" id="recently-changed">97 <div class="three column right" id="recently-changed"
98 tal:content="cache:private,5 minutes">
96 <h2>Recently changed</h2>99 <h2>Recently changed</h2>
97 <ul>100 <ul>
98 <li tal:repeat="branch view/recently_changed_branches">101 <li tal:repeat="branch view/recently_changed_branches">
@@ -108,7 +111,7 @@
108 </div>111 </div>
109 </div>112 </div>
110 <div class="clear"></div>113 <div class="clear"></div>
111 <div id="application-footer">114 <div id="application-footer" tal:content="cache:public,30 minutes">
112 <div>115 <div>
113 <strong tal:content="view/branch_count">123</strong>116 <strong tal:content="view/branch_count">123</strong>
114 branches registered in117 branches registered in
115118
=== modified file 'utilities/page-performance-report.ini'
--- utilities/page-performance-report.ini 2010-02-03 14:52:44 +0000
+++ utilities/page-performance-report.ini 2010-03-11 11:53:27 +0000
@@ -1,4 +1,7 @@
1[categories]1[categories]
2# Category -> Python regular expression.
3# Remeber to quote ?, ., + & ? characters to match litterally.
4# 'kodos' is useful for interactively testing regular expressions.
2All Launchpad=.5All Launchpad=.
36
4Registry=^https?://(edge\.)?launchpad\.7Registry=^https?://(edge\.)?launchpad\.
@@ -15,6 +18,7 @@
15Bugs - Search=/\+bugs\?18Bugs - Search=/\+bugs\?
1619
17Code=^https?://code\.(edge\.)?launchpad\.20Code=^https?://code\.(edge\.)?launchpad\.
21Code - Front page=^https?://code.[^/]+/?(?:\?.*)?$
18Code - PPA Index=/\+archive/[^/]+$22Code - PPA Index=/\+archive/[^/]+$
19Code - Pillar Branches=^https?://code\.(edge\.)?launchpad\.[^/]+/\w[^/]*$23Code - Pillar Branches=^https?://code\.(edge\.)?launchpad\.[^/]+/\w[^/]*$
20Code - Branch Page=^https?://code\.(edge\.)?launchpad\.[^/]+/(~|%7E)[^/]+/[^/]+/[^/]+$24Code - Branch Page=^https?://code\.(edge\.)?launchpad\.[^/]+/(~|%7E)[^/]+/[^/]+/[^/]+$