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
1=== modified file 'lib/lp/code/templates/bazaar-index.pt'
2--- lib/lp/code/templates/bazaar-index.pt 2009-08-28 01:31:51 +0000
3+++ lib/lp/code/templates/bazaar-index.pt 2010-03-11 11:53:27 +0000
4@@ -47,13 +47,13 @@
5 # XXX mpt 20080222 bug=84913: This link should be changed to
6 # the URL produced.
7 </tal:XXX>
8- <a href="/+recently-imported-branches">over 1000
9- <abbr>CVS</abbr> and <abbr>SVN</abbr> projects</a>,
10+ <a href="/+recently-imported-branches">over 2000
11+ <abbr>CVS</abbr>, <abbr>SVN</abbr>, Git and Mercurial projects</a>,
12 so you can use Bazaar with those too.
13 (<a href="https://help.launchpad.net/Code">Read our guide</a>)
14 </p>
15
16- <div id="project-cloud-preview">
17+ <div id="project-cloud-preview" tal:content="cache:public,6 hours">
18 <h2>Projects with active branches</h2>
19 <a tal:repeat="product view/short_product_tag_cloud"
20 tal:attributes="href product/url;
21@@ -64,7 +64,8 @@
22 </div>
23
24 <div class="columns">
25- <div class="three column left" id="recent-imports">
26+ <div class="three column left" id="recent-imports"
27+ tal:content="cache:private,15 minutes">
28 <h2>Recent imports</h2>
29 <ul>
30 <li tal:repeat="branch view/recently_imported_branches">
31@@ -78,7 +79,8 @@
32 </ul>
33 <p><a href="/+recently-imported-branches">more&#8230;</a></p>
34 </div>
35- <div class="three column middle" id="recently-registered">
36+ <div class="three column middle" id="recently-registered"
37+ tal:content="cache:private,3 minutes">
38 <h2>Recently registered</h2>
39 <ul>
40 <li tal:repeat="branch view/recently_registered_branches">
41@@ -92,7 +94,8 @@
42 </ul>
43 <p><a href="/+recently-registered-branches">more&#8230;</a></p>
44 </div>
45- <div class="three column right" id="recently-changed">
46+ <div class="three column right" id="recently-changed"
47+ tal:content="cache:private,5 minutes">
48 <h2>Recently changed</h2>
49 <ul>
50 <li tal:repeat="branch view/recently_changed_branches">
51@@ -108,7 +111,7 @@
52 </div>
53 </div>
54 <div class="clear"></div>
55- <div id="application-footer">
56+ <div id="application-footer" tal:content="cache:public,30 minutes">
57 <div>
58 <strong tal:content="view/branch_count">123</strong>
59 branches registered in
60
61=== modified file 'utilities/page-performance-report.ini'
62--- utilities/page-performance-report.ini 2010-02-03 14:52:44 +0000
63+++ utilities/page-performance-report.ini 2010-03-11 11:53:27 +0000
64@@ -1,4 +1,7 @@
65 [categories]
66+# Category -> Python regular expression.
67+# Remeber to quote ?, ., + & ? characters to match litterally.
68+# 'kodos' is useful for interactively testing regular expressions.
69 All Launchpad=.
70
71 Registry=^https?://(edge\.)?launchpad\.
72@@ -15,6 +18,7 @@
73 Bugs - Search=/\+bugs\?
74
75 Code=^https?://code\.(edge\.)?launchpad\.
76+Code - Front page=^https?://code.[^/]+/?(?:\?.*)?$
77 Code - PPA Index=/\+archive/[^/]+$
78 Code - Pillar Branches=^https?://code\.(edge\.)?launchpad\.[^/]+/\w[^/]*$
79 Code - Branch Page=^https?://code\.(edge\.)?launchpad\.[^/]+/(~|%7E)[^/]+/[^/]+/[^/]+$