{"action":"created","issue":{"url":"https://api.github.com/repos/craftercms/craftercms/issues/309","repository_url":"https://api.github.com/repos/craftercms/craftercms","labels_url":"https://api.github.com/repos/craftercms/craftercms/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/craftercms/craftercms/issues/309/comments","events_url":"https://api.github.com/repos/craftercms/craftercms/issues/309/events","html_url":"https://github.com/craftercms/craftercms/issues/309","id":194614590,"number":309,"title":"Pencils don't render at once when there are many placeholders","user":{"login":"asotog","id":813023,"avatar_url":"https://avatars.githubusercontent.com/u/813023?v=3","gravatar_id":"","url":"https://api.github.com/users/asotog","html_url":"https://github.com/asotog","followers_url":"https://api.github.com/users/asotog/followers","following_url":"https://api.github.com/users/asotog/following{/other_user}","gists_url":"https://api.github.com/users/asotog/gists{/gist_id}","starred_url":"https://api.github.com/users/asotog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asotog/subscriptions","organizations_url":"https://api.github.com/users/asotog/orgs","repos_url":"https://api.github.com/users/asotog/repos","events_url":"https://api.github.com/users/asotog/events{/privacy}","received_events_url":"https://api.github.com/users/asotog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-09T14:52:04Z","updated_at":"2016-12-09T20:50:06Z","closed_at":null,"body":"Please see attached image.\r\n\r\n1) Let's say you have like 20 elements in your page, where you can enable the pencils\r\n\r\n2) Click the pencil toggle icon in the context nav. It takes a while to render all pencils on the page.\r\n\r\nExpected: Pencils should not be that slow to appear, it seems the issue is happening because per each pencil, ui needs to make 2 service requests, one for security (`http://localhost:8080/studio/api/1/services/api/1/security/get-user-permissions.json?site=tests&path=/site/components/slider-sets/default.xml&user=admin&nocache=Fri%20Dec%2009%202016%2008:26:53%20GMT-0600%20(CST)`) \r\n\r\nand other one to retrieve content information (`http://localhost:8080/studio/api/1/services/api/1/content/get-item.json?site=tests&path=/site/components/page/entry/4b34ce1b-064a-2880-68bb-2d7e1cf4355c.xml&populateDependencies=false&nocache=Fri%20Dec%2009%202016%2008:26:53%20GMT-0600%20(CST)&nocache=Fri%20Dec%2009%202016%2008:26:53%20GMT-0600%20(CST)`)\r\n\r\nImprovement approach: Maybe instead of doing 1 request per pencil, we might send instead the list of elements (batch request), so service response with the list of associated elements data, this will reduce the N requests to just 2 requests, no matter how many pencils need to be loaded.\r\n\r\n![untitled drawing](https://cloud.githubusercontent.com/assets/813023/21052872/abc949e0-bdec-11e6-9be6-df775367f667.jpg)\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/craftercms/craftercms/issues/comments/266119581","html_url":"https://github.com/craftercms/craftercms/issues/309#issuecomment-266119581","issue_url":"https://api.github.com/repos/craftercms/craftercms/issues/309","id":266119581,"user":{"login":"asotog","id":813023,"avatar_url":"https://avatars.githubusercontent.com/u/813023?v=3","gravatar_id":"","url":"https://api.github.com/users/asotog","html_url":"https://github.com/asotog","followers_url":"https://api.github.com/users/asotog/followers","following_url":"https://api.github.com/users/asotog/following{/other_user}","gists_url":"https://api.github.com/users/asotog/gists{/gist_id}","starred_url":"https://api.github.com/users/asotog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asotog/subscriptions","organizations_url":"https://api.github.com/users/asotog/orgs","repos_url":"https://api.github.com/users/asotog/repos","events_url":"https://api.github.com/users/asotog/events{/privacy}","received_events_url":"https://api.github.com/users/asotog/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T20:50:06Z","updated_at":"2016-12-09T20:50:06Z","body":"Request data updated\r\n\r\n![crafter pencils improvement](https://cloud.githubusercontent.com/assets/813023/21064110/bfcfc194-be1e-11e6-8082-340fa1941d21.jpg)\r\n"}}
{"actor":{"display_login":"asotog"}}