{"action":"opened","number":11698,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11698","id":82090576,"html_url":"https://github.com/joomla/joomla-cms/pull/11698","diff_url":"https://github.com/joomla/joomla-cms/pull/11698.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/11698.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11698","number":11698,"state":"open","locked":false,"title":"Avoid trying to load a module's language file multiple times","user":{"login":"mbabker","id":368545,"avatar_url":"https://avatars.githubusercontent.com/u/368545?v=3","gravatar_id":"","url":"https://api.github.com/users/mbabker","html_url":"https://github.com/mbabker","followers_url":"https://api.github.com/users/mbabker/followers","following_url":"https://api.github.com/users/mbabker/following{/other_user}","gists_url":"https://api.github.com/users/mbabker/gists{/gist_id}","starred_url":"https://api.github.com/users/mbabker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbabker/subscriptions","organizations_url":"https://api.github.com/users/mbabker/orgs","repos_url":"https://api.github.com/users/mbabker/repos","events_url":"https://api.github.com/users/mbabker/events{/privacy}","received_events_url":"https://api.github.com/users/mbabker/received_events","type":"User","site_admin":false},"body":"### Summary of Changes\r\n\r\nDepending on how many times a module gets used on a page, its language files may attempt to be loaded multiple times.  Because of the internal loading of the default language, depending on where a language file is located the load method will go through at least a couple of loops resulting in a bunch of extra processing.  Example:\r\n\r\n<img width=\"869\" alt=\"screen shot 2016-08-20 at 4 43 29 pm\" src=\"https://cloud.githubusercontent.com/assets/368545/17834059/2767ea50-66f6-11e6-9aca-2e51099fc5f0.png\">\r\n\r\nBy checking if the files have been loaded first, we can cut back on the number of loops that get made here.  Example:\r\n\r\n<img width=\"863\" alt=\"screen shot 2016-08-20 at 4 46 48 pm\" src=\"https://cloud.githubusercontent.com/assets/368545/17834067/4b88a14a-66f6-11e6-9b31-792c172fe525.png\">\r\n\r\n### Testing Instructions\r\n\r\nThe module's language files are still loaded correctly.\r\n\r\n### Documentation Changes Required\r\n\r\nN/A","created_at":"2016-08-20T21:51:30Z","updated_at":"2016-08-20T21:51:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11698/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11698/comments","review_comment_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11698/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/a5ecc9a853858fdee514acd0213a2249a51cd42a","head":{"label":"mbabker:dupe-module-load-languages","ref":"dupe-module-load-languages","sha":"a5ecc9a853858fdee514acd0213a2249a51cd42a","user":{"login":"mbabker","id":368545,"avatar_url":"https://avatars.githubusercontent.com/u/368545?v=3","gravatar_id":"","url":"https://api.github.com/users/mbabker","html_url":"https://github.com/mbabker","followers_url":"https://api.github.com/users/mbabker/followers","following_url":"https://api.github.com/users/mbabker/following{/other_user}","gists_url":"https://api.github.com/users/mbabker/gists{/gist_id}","starred_url":"https://api.github.com/users/mbabker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbabker/subscriptions","organizations_url":"https://api.github.com/users/mbabker/orgs","repos_url":"https://api.github.com/users/mbabker/repos","events_url":"https://api.github.com/users/mbabker/events{/privacy}","received_events_url":"https://api.github.com/users/mbabker/received_events","type":"User","site_admin":false},"repo":{"id":2511842,"name":"joomla-cms","full_name":"mbabker/joomla-cms","owner":{"login":"mbabker","id":368545,"avatar_url":"https://avatars.githubusercontent.com/u/368545?v=3","gravatar_id":"","url":"https://api.github.com/users/mbabker","html_url":"https://github.com/mbabker","followers_url":"https://api.github.com/users/mbabker/followers","following_url":"https://api.github.com/users/mbabker/following{/other_user}","gists_url":"https://api.github.com/users/mbabker/gists{/gist_id}","starred_url":"https://api.github.com/users/mbabker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbabker/subscriptions","organizations_url":"https://api.github.com/users/mbabker/orgs","repos_url":"https://api.github.com/users/mbabker/repos","events_url":"https://api.github.com/users/mbabker/events{/privacy}","received_events_url":"https://api.github.com/users/mbabker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbabker/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/mbabker/joomla-cms","forks_url":"https://api.github.com/repos/mbabker/joomla-cms/forks","keys_url":"https://api.github.com/repos/mbabker/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbabker/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbabker/joomla-cms/teams","hooks_url":"https://api.github.com/repos/mbabker/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/mbabker/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/mbabker/joomla-cms/events","assignees_url":"https://api.github.com/repos/mbabker/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/mbabker/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/mbabker/joomla-cms/tags","blobs_url":"https://api.github.com/repos/mbabker/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbabker/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbabker/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbabker/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbabker/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/mbabker/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/mbabker/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/mbabker/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/mbabker/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/mbabker/joomla-cms/subscription","commits_url":"https://api.github.com/repos/mbabker/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbabker/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbabker/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbabker/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbabker/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/mbabker/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbabker/joomla-cms/merges","archive_url":"https://api.github.com/repos/mbabker/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbabker/joomla-cms/downloads","issues_url":"https://api.github.com/repos/mbabker/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/mbabker/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/mbabker/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/mbabker/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbabker/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/mbabker/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/mbabker/joomla-cms/deployments","created_at":"2011-10-04T13:12:36Z","updated_at":"2016-05-26T10:10:36Z","pushed_at":"2016-08-20T21:47:39Z","git_url":"git://github.com/mbabker/joomla-cms.git","ssh_url":"git@github.com:mbabker/joomla-cms.git","clone_url":"https://github.com/mbabker/joomla-cms.git","svn_url":"https://github.com/mbabker/joomla-cms","homepage":"http://joomla.org","size":155659,"stargazers_count":10,"watchers_count":10,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":0,"forks":5,"open_issues":0,"watchers":10,"default_branch":"master"}},"base":{"label":"joomla:staging","ref":"staging","sha":"326e3a339309d93d11897a774f10394cb0706f8b","user":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":2464908,"name":"joomla-cms","full_name":"joomla/joomla-cms","owner":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/joomla-cms","description":"Home of the Joomla! Content Management System","fork":false,"url":"https://api.github.com/repos/joomla/joomla-cms","forks_url":"https://api.github.com/repos/joomla/joomla-cms/forks","keys_url":"https://api.github.com/repos/joomla/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/joomla-cms/teams","hooks_url":"https://api.github.com/repos/joomla/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/joomla-cms/events","assignees_url":"https://api.github.com/repos/joomla/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/joomla-cms/tags","blobs_url":"https://api.github.com/repos/joomla/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/joomla/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/joomla/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/joomla/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/joomla/joomla-cms/subscription","commits_url":"https://api.github.com/repos/joomla/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/joomla/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/joomla-cms/merges","archive_url":"https://api.github.com/repos/joomla/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/joomla-cms/downloads","issues_url":"https://api.github.com/repos/joomla/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/joomla/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/joomla/joomla-cms/deployments","created_at":"2011-09-27T02:07:38Z","updated_at":"2016-08-20T19:47:35Z","pushed_at":"2016-08-20T21:46:44Z","git_url":"git://github.com/joomla/joomla-cms.git","ssh_url":"git@github.com:joomla/joomla-cms.git","clone_url":"https://github.com/joomla/joomla-cms.git","svn_url":"https://github.com/joomla/joomla-cms","homepage":"https://www.joomla.org","size":290728,"stargazers_count":2112,"watchers_count":2112,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2271,"mirror_url":null,"open_issues_count":468,"forks":2271,"open_issues":468,"watchers":2112,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/11698"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/11698"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/11698"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/11698/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/11698/comments"},"review_comment":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/11698/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/a5ecc9a853858fdee514acd0213a2249a51cd42a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":7,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"mbabker"}}