{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/12028","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12028/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12028/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12028/events","html_url":"https://github.com/joomla/joomla-cms/pull/12028","id":176619382,"number":12028,"title":"[JAccess] Improve ACL asset preloading performance/memory consumption","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,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-13T11:48:49Z","updated_at":"2016-09-13T14:55:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/12028","html_url":"https://github.com/joomla/joomla-cms/pull/12028","diff_url":"https://github.com/joomla/joomla-cms/pull/12028.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/12028.patch"},"body":"### Summary of Changes\r\n\r\nImprove ACL asset preloading performance/memory consumption.\r\n\r\n#### Before\r\n![image](https://cloud.githubusercontent.com/assets/9630530/18472422/576f8926-79af-11e6-8739-25e0abaabae3.png)\r\n\r\n#### After\r\n![image](https://cloud.githubusercontent.com/assets/9630530/18472428/5f5ca736-79af-11e6-8e3c-281ac7b4836e.png)\r\n\r\n### Testing Instructions\r\n\r\n0. Code review\r\n1. Use latest staging and apply patch\r\n2. Turn on debug mode and debug system plugin\r\n3. Check the profiler in several frontend/backend pages and notice the more ACL checks are done the more is the performance improvements.\r\n4. Check if ACL permissions work fine (do multiple tests). Make sure there are no ACL breachs after this.\r\n\r\nThe performance improvements are particular higher when logged in with a non-root user and a lot of modules (since in this cases there are a lot of ACL checks).\r\n\r\n### Documentation Changes Required\r\n\r\nNone."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/246709247","html_url":"https://github.com/joomla/joomla-cms/pull/12028#issuecomment-246709247","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12028","id":246709247,"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},"created_at":"2016-09-13T14:55:39Z","updated_at":"2016-09-13T14:55:39Z","body":"hum ... don't quite understand why unit tests are failing\r\n\r\n```\r\nThere were 3 failures:\r\n1) JUserTest::testAuthorise with data set \"null asset Super Admin\" (42, 'core.create', null, true)\r\nLine: 259 Failed for user 42\r\nFailed asserting that null matches expected true.\r\n/home/travis/build/joomla/joomla-cms/tests/unit/suites/libraries/joomla/user/JUserTest.php:260\r\n\r\n2) JUserTest::testAuthorise with data set \"fictional action Super Admin\" (42, 'nuke', 'root.1', true)\r\nLine: 259 Failed for user 42\r\nFailed asserting that null matches expected true.\r\n/home/travis/build/joomla/joomla-cms/tests/unit/suites/libraries/joomla/user/JUserTest.php:260\r\n\r\n3) JUserTest::testAuthorise with data set \"core.admin Super Admin\" (42, 'core.admin', 'root.1', true)\r\nLine: 259 Failed for user 42\r\nFailed asserting that null matches expected true.\r\n/home/travis/build/joomla/joomla-cms/tests/unit/suites/libraries/joomla/user/JUserTest.php:260\r\n```\r\n\r\nIf i do\r\n```php\r\necho '<br/>'.var_dump(JAccess::check(767, 'core.create', null));\r\necho '<br/>'.var_dump(JAccess::check(767, 'nuke', 'root.1'));\r\necho '<br/>'.var_dump(JAccess::check(767, 'core.admin', 'root.1'));\r\necho '<br/>'.var_dump(JFactory::getUser(767)->authorise('core.create', null));\r\necho '<br/>'.var_dump(JFactory::getUser(767)->authorise('nuke', 'root.1'));\r\necho '<br/>'.var_dump(JFactory::getUser(767)->authorise('core.admin', 'root.1'));\r\n```\r\nWith or without the patch it returns\r\n```\r\nNULL \r\nNULL \r\nbool(true) \r\nbool(true) \r\nbool(true) \r\nbool(true) \r\n```\r\nNote: 767 is the test install super user id"}}
{"actor":{"display_login":"andrepereiradasilva"}}