{"action":"created","issue":{"url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2047","repository_url":"https://api.github.com/repos/ThemeFuse/Unyson","labels_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2047/labels{/name}","comments_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2047/comments","events_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2047/events","html_url":"https://github.com/ThemeFuse/Unyson/issues/2047","id":178649340,"number":2047,"title":"Backend: enqueue_options_static optimization.","user":{"login":"mowshon","id":2056896,"avatar_url":"https://avatars.githubusercontent.com/u/2056896?v=3","gravatar_id":"","url":"https://api.github.com/users/mowshon","html_url":"https://github.com/mowshon","followers_url":"https://api.github.com/users/mowshon/followers","following_url":"https://api.github.com/users/mowshon/following{/other_user}","gists_url":"https://api.github.com/users/mowshon/gists{/gist_id}","starred_url":"https://api.github.com/users/mowshon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mowshon/subscriptions","organizations_url":"https://api.github.com/users/mowshon/orgs","repos_url":"https://api.github.com/users/mowshon/repos","events_url":"https://api.github.com/users/mowshon/events{/privacy}","received_events_url":"https://api.github.com/users/mowshon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"moldcraft","id":1475489,"avatar_url":"https://avatars.githubusercontent.com/u/1475489?v=3","gravatar_id":"","url":"https://api.github.com/users/moldcraft","html_url":"https://github.com/moldcraft","followers_url":"https://api.github.com/users/moldcraft/followers","following_url":"https://api.github.com/users/moldcraft/following{/other_user}","gists_url":"https://api.github.com/users/moldcraft/gists{/gist_id}","starred_url":"https://api.github.com/users/moldcraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moldcraft/subscriptions","organizations_url":"https://api.github.com/users/moldcraft/orgs","repos_url":"https://api.github.com/users/moldcraft/repos","events_url":"https://api.github.com/users/moldcraft/events{/privacy}","received_events_url":"https://api.github.com/users/moldcraft/received_events","type":"User","site_admin":false},"assignees":[{"login":"moldcraft","id":1475489,"avatar_url":"https://avatars.githubusercontent.com/u/1475489?v=3","gravatar_id":"","url":"https://api.github.com/users/moldcraft","html_url":"https://github.com/moldcraft","followers_url":"https://api.github.com/users/moldcraft/followers","following_url":"https://api.github.com/users/moldcraft/following{/other_user}","gists_url":"https://api.github.com/users/moldcraft/gists{/gist_id}","starred_url":"https://api.github.com/users/moldcraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moldcraft/subscriptions","organizations_url":"https://api.github.com/users/moldcraft/orgs","repos_url":"https://api.github.com/users/moldcraft/repos","events_url":"https://api.github.com/users/moldcraft/events{/privacy}","received_events_url":"https://api.github.com/users/moldcraft/received_events","type":"User","site_admin":false}],"milestone":null,"comments":14,"created_at":"2016-09-22T15:55:50Z","updated_at":"2016-09-22T19:29:28Z","closed_at":null,"body":"I have a proposal on backend optimization. Some days ago, I test the Unyson productivity with xdebug profiler.\r\n\r\nSo, this is what I got.\r\n![Initial](https://i.gyazo.com/5957d37e56d75dbbf55cdc50037723eb.png)\r\n_( Image: 1 )_\r\n\r\n**File:** unyson/framework/core/components/backend.php [line: 1534]\r\n**Method:** enqueue_options_static()\r\n\r\nThis method get `type` from options-array and depends on this `type` he execute `enqueue_static()` for container or option types.\r\n\r\nWe can see in `Image 1` that all this stuff a very expensive in time and calls.\r\n\r\n------------------------\r\nI try to fix this with simple regular expresion that search in JSON all types and execute his `enqueue` method.\r\n\r\nThe result:\r\n![Final](https://i.gyazo.com/421f9be245c060df77466b13b647825e.png)\r\n**1551** less calls and save ~1 sec for Unyson execution.\r\n------------------------\r\nYou can try my fork: https://github.com/mowshon/Unyson\r\nMy fix: https://github.com/mowshon/Unyson/blob/master/framework/core/components/backend.php#L1565-L1580"},"comment":{"url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/comments/249004180","html_url":"https://github.com/ThemeFuse/Unyson/issues/2047#issuecomment-249004180","issue_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2047","id":249004180,"user":{"login":"mowshon","id":2056896,"avatar_url":"https://avatars.githubusercontent.com/u/2056896?v=3","gravatar_id":"","url":"https://api.github.com/users/mowshon","html_url":"https://github.com/mowshon","followers_url":"https://api.github.com/users/mowshon/followers","following_url":"https://api.github.com/users/mowshon/following{/other_user}","gists_url":"https://api.github.com/users/mowshon/gists{/gist_id}","starred_url":"https://api.github.com/users/mowshon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mowshon/subscriptions","organizations_url":"https://api.github.com/users/mowshon/orgs","repos_url":"https://api.github.com/users/mowshon/repos","events_url":"https://api.github.com/users/mowshon/events{/privacy}","received_events_url":"https://api.github.com/users/mowshon/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T19:29:28Z","updated_at":"2016-09-22T19:29:28Z","body":"Ups, I will return this method back."}}
{"actor":{"display_login":"mowshon"}}