GitHub PullRequestReviewCommentEvent at 2014-04-22 19:03:04
Repository: mrburns
Actor: jgmize
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla/mrburns/pulls/comments/11870132","id":11870132,"diff_hunk":"@@ -40,6 +44,19 @@ def get_fb_share_url(url):\n     return '?'.join([FB_URL, urlencode({'u': url})])\n \n \n+def get_sorted_countries_list(locale):\n+    \"\"\"Return a localized list of all countries sorted by name.\"\"\"\n+    countries_by_code = product_details.get_regions(locale)\n+    if locale.startswith('en'):\n+        return sorted([(code.upper(), name) for code, name in countries_by_code.items()],\n+                      key=itemgetter(1))\n+    else:\n+        c = Collator()","path":"mrburns/main/views.py","position":30,"original_position":30,"commit_id":"01a9345a7e27e1b53458022f744716fdef5ab277","original_commit_id":"01a9345a7e27e1b53458022f744716fdef5ab277","user":{"login":"jgmize","id":161718,"avatar_url":"https://avatars.githubusercontent.com/u/161718?","gravatar_id":"e6eb0fa194f91efca1e162b18eb03c51","url":"https://api.github.com/users/jgmize","html_url":"https://github.com/jgmize","followers_url":"https://api.github.com/users/jgmize/followers","following_url":"https://api.github.com/users/jgmize/following{/other_user}","gists_url":"https://api.github.com/users/jgmize/gists{/gist_id}","starred_url":"https://api.github.com/users/jgmize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgmize/subscriptions","organizations_url":"https://api.github.com/users/jgmize/orgs","repos_url":"https://api.github.com/users/jgmize/repos","events_url":"https://api.github.com/users/jgmize/events{/privacy}","received_events_url":"https://api.github.com/users/jgmize/received_events","type":"User","site_admin":false},"body":"The initialization routine for Collator is pretty expensive-- it takes over 500ms on my laptop to construct a Trie from the allkeys.txt file. How about we go ahead and create a Collator instance at the module level so that it's a startup cost instead of a per-request cost?","created_at":"2014-04-22T19:03:04Z","updated_at":"2014-04-22T19:03:04Z","html_url":"https://github.com/mozilla/mrburns/pull/100#discussion_r11870132","pull_request_url":"https://api.github.com/repos/mozilla/mrburns/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/mozilla/mrburns/pulls/comments/11870132"},"html":{"href":"https://github.com/mozilla/mrburns/pull/100#discussion_r11870132"},"pull_request":{"href":"https://api.github.com/repos/mozilla/mrburns/pulls/100"}}}}