{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/8869","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8869/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8869/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8869/events","html_url":"https://github.com/joomla/joomla-cms/pull/8869","id":125793327,"number":8869,"title":"Mod languages performance improvements","user":{"login":"andrepereiradasilva","id":9630530,"avatar_url":"https://avatars.githubusercontent.com/u/9630530?v=3","gravatar_id":"","url":"https://api.github.com/users/andrepereiradasilva","html_url":"https://github.com/andrepereiradasilva","followers_url":"https://api.github.com/users/andrepereiradasilva/followers","following_url":"https://api.github.com/users/andrepereiradasilva/following{/other_user}","gists_url":"https://api.github.com/users/andrepereiradasilva/gists{/gist_id}","starred_url":"https://api.github.com/users/andrepereiradasilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrepereiradasilva/subscriptions","organizations_url":"https://api.github.com/users/andrepereiradasilva/orgs","repos_url":"https://api.github.com/users/andrepereiradasilva/repos","events_url":"https://api.github.com/users/andrepereiradasilva/events{/privacy}","received_events_url":"https://api.github.com/users/andrepereiradasilva/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-10T02:05:06Z","updated_at":"2016-01-17T01:35:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/8869","html_url":"https://github.com/joomla/joomla-cms/pull/8869","diff_url":"https://github.com/joomla/joomla-cms/pull/8869.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/8869.patch"},"body":"#### Description\r\n\r\nMod_languages (the module with the language flags), is one of the modules that can be in all pages that has slower performances (if 3 or more languages > 10ms).\r\n\r\nSo, this PR makes some code changes to get some small performance improvements.\r\n\r\nNo behaviour is changed.\r\n\r\n##### Performance Tests\r\n\r\n| Published Languages   | Before PR   | After PR    |\r\n|:--------------------- |:-----------:|:-----------:|\r\n| 1\t\t\t            | ~5.5 ms     | ~3.7 ms     |\r\n| 2\t\t\t            | ~7.5 ms     | ~4.0 ms     |\r\n| 3\t\t\t            | ~10 ms      | ~4.2 ms     |\r\n| 4\t\t\t            | ~12 ms      | ~4.4 ms     |\r\n| 5\t\t\t            | ~15 ms      | ~5.3 ms     |\r\n\r\nNote: Tests were made with Joomla Debug Console in PHP 5.6 - no caching\r\n\r\n#### How to test\r\n\r\n1. Fresh Joomla install with multilanguage (install 5 or more languages)\r\n2. Apply this patch.\r\n3. Verify all the flags in mod_languages are working fine\r\n\r\nTo check the performance improvements, turn on Joomla debugging and check the `Application: afterRenderModule mod_languages (xxxxxx)` execution time, before and after the PR\r\n\r\n#### Observations\r\n\r\nSuggestions, code reviews and improvements are welcome."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/172282831","html_url":"https://github.com/joomla/joomla-cms/pull/8869#issuecomment-172282831","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/8869","id":172282831,"user":{"login":"dgt41","id":3889375,"avatar_url":"https://avatars.githubusercontent.com/u/3889375?v=3","gravatar_id":"","url":"https://api.github.com/users/dgt41","html_url":"https://github.com/dgt41","followers_url":"https://api.github.com/users/dgt41/followers","following_url":"https://api.github.com/users/dgt41/following{/other_user}","gists_url":"https://api.github.com/users/dgt41/gists{/gist_id}","starred_url":"https://api.github.com/users/dgt41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgt41/subscriptions","organizations_url":"https://api.github.com/users/dgt41/orgs","repos_url":"https://api.github.com/users/dgt41/repos","events_url":"https://api.github.com/users/dgt41/events{/privacy}","received_events_url":"https://api.github.com/users/dgt41/received_events","type":"User","site_admin":false},"created_at":"2016-01-17T01:35:50Z","updated_at":"2016-01-17T01:35:50Z","body":"I have tested this item :white_check_mark: successfully on 2b4938e29cd115bfdb299074527b1ca91098f26d<hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"https://issues.joomla.org/tracker/joomla-cms/8869\">issues.joomla.org/joomla-cms/8869</a>.</sub>"}}