{"action":"created","issue":{"url":"https://api.github.com/repos/joomla-framework/registry/issues/36","repository_url":"https://api.github.com/repos/joomla-framework/registry","labels_url":"https://api.github.com/repos/joomla-framework/registry/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/joomla-framework/registry/issues/36/comments","events_url":"https://api.github.com/repos/joomla-framework/registry/issues/36/events","html_url":"https://github.com/joomla-framework/registry/pull/36","id":113413953,"number":36,"title":"Speed up loading menu params","user":{"login":"gjedeer","id":315648,"avatar_url":"https://avatars.githubusercontent.com/u/315648?v=3","gravatar_id":"","url":"https://api.github.com/users/gjedeer","html_url":"https://github.com/gjedeer","followers_url":"https://api.github.com/users/gjedeer/followers","following_url":"https://api.github.com/users/gjedeer/following{/other_user}","gists_url":"https://api.github.com/users/gjedeer/gists{/gist_id}","starred_url":"https://api.github.com/users/gjedeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjedeer/subscriptions","organizations_url":"https://api.github.com/users/gjedeer/orgs","repos_url":"https://api.github.com/users/gjedeer/repos","events_url":"https://api.github.com/users/gjedeer/events{/privacy}","received_events_url":"https://api.github.com/users/gjedeer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2015-10-26T17:56:40Z","updated_at":"2016-07-31T11:02:54Z","closed_at":"2016-05-14T20:12:48Z","pull_request":{"url":"https://api.github.com/repos/joomla-framework/registry/pulls/36","html_url":"https://github.com/joomla-framework/registry/pull/36","diff_url":"https://github.com/joomla-framework/registry/pull/36.diff","patch_url":"https://github.com/joomla-framework/registry/pull/36.patch"},"body":"\r\n\r\nI'm working on improving performance of a Joomla site. I noticed that the longest part of generating a page is JApplicationCms->getMenu(). The query returns 380 menu items, each of them with a larger than usually params column (some extension). JApplicationCms took 1.78s to execute, out of which 1.37s has been spent in 489 calls of Registry::bindData.\r\n\r\nEssentially, for menu items, the flow is as following:\r\n\r\n    JMenu loads data rows, params is a JSON string\r\n    JRegistry loadString() converts this string to an object\r\n    JRegistry bindData() converts that object to an array\r\n    JRegistry bindData() creates a new object, iterates over the array and copies keys as object properties\r\n    The newly created object is returned\r\n\r\nI propose that for simple cases like loading a menu item, the flow looks like this:\r\n\r\n    JMenu loads data rows, params is a JSON string\r\n    JRegistry loadString() converts this string to an object\r\n    The object is returned\r\n\r\nAfter my changes, said site takes 0.21s to execute JApplicationCms->getMenu().\r\n"},"comment":{"url":"https://api.github.com/repos/joomla-framework/registry/issues/comments/236423891","html_url":"https://github.com/joomla-framework/registry/pull/36#issuecomment-236423891","issue_url":"https://api.github.com/repos/joomla-framework/registry/issues/36","id":236423891,"user":{"login":"wilsonge","id":1986000,"avatar_url":"https://avatars.githubusercontent.com/u/1986000?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonge","html_url":"https://github.com/wilsonge","followers_url":"https://api.github.com/users/wilsonge/followers","following_url":"https://api.github.com/users/wilsonge/following{/other_user}","gists_url":"https://api.github.com/users/wilsonge/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonge/subscriptions","organizations_url":"https://api.github.com/users/wilsonge/orgs","repos_url":"https://api.github.com/users/wilsonge/repos","events_url":"https://api.github.com/users/wilsonge/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonge/received_events","type":"User","site_admin":false},"created_at":"2016-07-31T11:02:54Z","updated_at":"2016-07-31T11:02:54Z","body":"Don't stress - turns out the issue wasn't due to this PR after all :) Should have posted a follow up here. Mea culpa!"}}
{"actor":{"display_login":"wilsonge"}}