{"action":"opened","number":885,"pull_request":{"url":"https://api.github.com/repos/revel/revel/pulls/885","id":30166887,"html_url":"https://github.com/revel/revel/pull/885","diff_url":"https://github.com/revel/revel/pull/885.diff","patch_url":"https://github.com/revel/revel/pull/885.patch","issue_url":"https://api.github.com/repos/revel/revel/issues/885","number":885,"state":"open","locked":false,"title":"Optimize search of template names","user":{"login":"anonx","id":6612636,"avatar_url":"https://avatars.githubusercontent.com/u/6612636?v=3","gravatar_id":"","url":"https://api.github.com/users/anonx","html_url":"https://github.com/anonx","followers_url":"https://api.github.com/users/anonx/followers","following_url":"https://api.github.com/users/anonx/following{/other_user}","gists_url":"https://api.github.com/users/anonx/gists{/gist_id}","starred_url":"https://api.github.com/users/anonx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anonx/subscriptions","organizations_url":"https://api.github.com/users/anonx/orgs","repos_url":"https://api.github.com/users/anonx/repos","events_url":"https://api.github.com/users/anonx/events{/privacy}","received_events_url":"https://api.github.com/users/anonx/received_events","type":"User","site_admin":false},"body":"This PR addresses https://github.com/revel/revel/pull/753#commitcomment-9943539 and #729.\r\n\r\nBehaviour of `Template` method from #753 should not be affected.\r\n* If we have `index.html` and `Index.html` only one of them will be registered as template. And the second one will be ignored.\r\n* If we have `{define \"test\"}` and `{define \"TEST\"}` the first declaration will be used and the second one ignored.\r\n* Both `c.RenderTemplate(\"app/index.html\")` and `c.RenderTemplate('App/Index.html')` work no matter what register `app` dir and `index.html` file have.\r\n\r\nThe only change is a map of lower case names is generated once. The map is then used to find a real name of template (whatever register it has). Thus, number of iterations to find the template we need (on average) will be decreased.","created_at":"2015-02-27T13:46:53Z","updated_at":"2015-02-27T13:46:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/revel/revel/pulls/885/commits","review_comments_url":"https://api.github.com/repos/revel/revel/pulls/885/comments","review_comment_url":"https://api.github.com/repos/revel/revel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/revel/revel/issues/885/comments","statuses_url":"https://api.github.com/repos/revel/revel/statuses/48bed67cd90508b50c995ab41656400641115ee1","head":{"label":"anonx:template_efficiency","ref":"template_efficiency","sha":"48bed67cd90508b50c995ab41656400641115ee1","user":{"login":"anonx","id":6612636,"avatar_url":"https://avatars.githubusercontent.com/u/6612636?v=3","gravatar_id":"","url":"https://api.github.com/users/anonx","html_url":"https://github.com/anonx","followers_url":"https://api.github.com/users/anonx/followers","following_url":"https://api.github.com/users/anonx/following{/other_user}","gists_url":"https://api.github.com/users/anonx/gists{/gist_id}","starred_url":"https://api.github.com/users/anonx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anonx/subscriptions","organizations_url":"https://api.github.com/users/anonx/orgs","repos_url":"https://api.github.com/users/anonx/repos","events_url":"https://api.github.com/users/anonx/events{/privacy}","received_events_url":"https://api.github.com/users/anonx/received_events","type":"User","site_admin":false},"repo":{"id":23906473,"name":"revel","full_name":"anonx/revel","owner":{"login":"anonx","id":6612636,"avatar_url":"https://avatars.githubusercontent.com/u/6612636?v=3","gravatar_id":"","url":"https://api.github.com/users/anonx","html_url":"https://github.com/anonx","followers_url":"https://api.github.com/users/anonx/followers","following_url":"https://api.github.com/users/anonx/following{/other_user}","gists_url":"https://api.github.com/users/anonx/gists{/gist_id}","starred_url":"https://api.github.com/users/anonx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anonx/subscriptions","organizations_url":"https://api.github.com/users/anonx/orgs","repos_url":"https://api.github.com/users/anonx/repos","events_url":"https://api.github.com/users/anonx/events{/privacy}","received_events_url":"https://api.github.com/users/anonx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anonx/revel","description":"A high productivity, full-stack web framework for the Go language.","fork":true,"url":"https://api.github.com/repos/anonx/revel","forks_url":"https://api.github.com/repos/anonx/revel/forks","keys_url":"https://api.github.com/repos/anonx/revel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anonx/revel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anonx/revel/teams","hooks_url":"https://api.github.com/repos/anonx/revel/hooks","issue_events_url":"https://api.github.com/repos/anonx/revel/issues/events{/number}","events_url":"https://api.github.com/repos/anonx/revel/events","assignees_url":"https://api.github.com/repos/anonx/revel/assignees{/user}","branches_url":"https://api.github.com/repos/anonx/revel/branches{/branch}","tags_url":"https://api.github.com/repos/anonx/revel/tags","blobs_url":"https://api.github.com/repos/anonx/revel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anonx/revel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anonx/revel/git/refs{/sha}","trees_url":"https://api.github.com/repos/anonx/revel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anonx/revel/statuses/{sha}","languages_url":"https://api.github.com/repos/anonx/revel/languages","stargazers_url":"https://api.github.com/repos/anonx/revel/stargazers","contributors_url":"https://api.github.com/repos/anonx/revel/contributors","subscribers_url":"https://api.github.com/repos/anonx/revel/subscribers","subscription_url":"https://api.github.com/repos/anonx/revel/subscription","commits_url":"https://api.github.com/repos/anonx/revel/commits{/sha}","git_commits_url":"https://api.github.com/repos/anonx/revel/git/commits{/sha}","comments_url":"https://api.github.com/repos/anonx/revel/comments{/number}","issue_comment_url":"https://api.github.com/repos/anonx/revel/issues/comments{/number}","contents_url":"https://api.github.com/repos/anonx/revel/contents/{+path}","compare_url":"https://api.github.com/repos/anonx/revel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anonx/revel/merges","archive_url":"https://api.github.com/repos/anonx/revel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anonx/revel/downloads","issues_url":"https://api.github.com/repos/anonx/revel/issues{/number}","pulls_url":"https://api.github.com/repos/anonx/revel/pulls{/number}","milestones_url":"https://api.github.com/repos/anonx/revel/milestones{/number}","notifications_url":"https://api.github.com/repos/anonx/revel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anonx/revel/labels{/name}","releases_url":"https://api.github.com/repos/anonx/revel/releases{/id}","created_at":"2014-09-11T06:11:32Z","updated_at":"2015-01-08T08:50:23Z","pushed_at":"2015-02-27T13:30:15Z","git_url":"git://github.com/anonx/revel.git","ssh_url":"git@github.com:anonx/revel.git","clone_url":"https://github.com/anonx/revel.git","svn_url":"https://github.com/anonx/revel","homepage":"http://revel.github.io","size":2534,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"revel:develop","ref":"develop","sha":"74cf8cc7f440815c81c097f8cba02122b76d56d4","user":{"login":"revel","id":6631594,"avatar_url":"https://avatars.githubusercontent.com/u/6631594?v=3","gravatar_id":"","url":"https://api.github.com/users/revel","html_url":"https://github.com/revel","followers_url":"https://api.github.com/users/revel/followers","following_url":"https://api.github.com/users/revel/following{/other_user}","gists_url":"https://api.github.com/users/revel/gists{/gist_id}","starred_url":"https://api.github.com/users/revel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/revel/subscriptions","organizations_url":"https://api.github.com/users/revel/orgs","repos_url":"https://api.github.com/users/revel/repos","events_url":"https://api.github.com/users/revel/events{/privacy}","received_events_url":"https://api.github.com/users/revel/received_events","type":"Organization","site_admin":false},"repo":{"id":2945088,"name":"revel","full_name":"revel/revel","owner":{"login":"revel","id":6631594,"avatar_url":"https://avatars.githubusercontent.com/u/6631594?v=3","gravatar_id":"","url":"https://api.github.com/users/revel","html_url":"https://github.com/revel","followers_url":"https://api.github.com/users/revel/followers","following_url":"https://api.github.com/users/revel/following{/other_user}","gists_url":"https://api.github.com/users/revel/gists{/gist_id}","starred_url":"https://api.github.com/users/revel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/revel/subscriptions","organizations_url":"https://api.github.com/users/revel/orgs","repos_url":"https://api.github.com/users/revel/repos","events_url":"https://api.github.com/users/revel/events{/privacy}","received_events_url":"https://api.github.com/users/revel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/revel/revel","description":"A high productivity, full-stack web framework for the Go language.","fork":false,"url":"https://api.github.com/repos/revel/revel","forks_url":"https://api.github.com/repos/revel/revel/forks","keys_url":"https://api.github.com/repos/revel/revel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/revel/revel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/revel/revel/teams","hooks_url":"https://api.github.com/repos/revel/revel/hooks","issue_events_url":"https://api.github.com/repos/revel/revel/issues/events{/number}","events_url":"https://api.github.com/repos/revel/revel/events","assignees_url":"https://api.github.com/repos/revel/revel/assignees{/user}","branches_url":"https://api.github.com/repos/revel/revel/branches{/branch}","tags_url":"https://api.github.com/repos/revel/revel/tags","blobs_url":"https://api.github.com/repos/revel/revel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/revel/revel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/revel/revel/git/refs{/sha}","trees_url":"https://api.github.com/repos/revel/revel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/revel/revel/statuses/{sha}","languages_url":"https://api.github.com/repos/revel/revel/languages","stargazers_url":"https://api.github.com/repos/revel/revel/stargazers","contributors_url":"https://api.github.com/repos/revel/revel/contributors","subscribers_url":"https://api.github.com/repos/revel/revel/subscribers","subscription_url":"https://api.github.com/repos/revel/revel/subscription","commits_url":"https://api.github.com/repos/revel/revel/commits{/sha}","git_commits_url":"https://api.github.com/repos/revel/revel/git/commits{/sha}","comments_url":"https://api.github.com/repos/revel/revel/comments{/number}","issue_comment_url":"https://api.github.com/repos/revel/revel/issues/comments{/number}","contents_url":"https://api.github.com/repos/revel/revel/contents/{+path}","compare_url":"https://api.github.com/repos/revel/revel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/revel/revel/merges","archive_url":"https://api.github.com/repos/revel/revel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/revel/revel/downloads","issues_url":"https://api.github.com/repos/revel/revel/issues{/number}","pulls_url":"https://api.github.com/repos/revel/revel/pulls{/number}","milestones_url":"https://api.github.com/repos/revel/revel/milestones{/number}","notifications_url":"https://api.github.com/repos/revel/revel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/revel/revel/labels{/name}","releases_url":"https://api.github.com/repos/revel/revel/releases{/id}","created_at":"2011-12-09T04:10:26Z","updated_at":"2015-02-27T11:39:54Z","pushed_at":"2015-02-24T06:49:39Z","git_url":"git://github.com/revel/revel.git","ssh_url":"git@github.com:revel/revel.git","clone_url":"https://github.com/revel/revel.git","svn_url":"https://github.com/revel/revel","homepage":"http://revel.github.io","size":9495,"stargazers_count":4841,"watchers_count":4841,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":709,"mirror_url":null,"open_issues_count":136,"forks":709,"open_issues":136,"watchers":4841,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/revel/revel/pulls/885"},"html":{"href":"https://github.com/revel/revel/pull/885"},"issue":{"href":"https://api.github.com/repos/revel/revel/issues/885"},"comments":{"href":"https://api.github.com/repos/revel/revel/issues/885/comments"},"review_comments":{"href":"https://api.github.com/repos/revel/revel/pulls/885/comments"},"review_comment":{"href":"https://api.github.com/repos/revel/revel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/revel/revel/pulls/885/commits"},"statuses":{"href":"https://api.github.com/repos/revel/revel/statuses/48bed67cd90508b50c995ab41656400641115ee1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":9,"deletions":8,"changed_files":1}}