{"action":"created","issue":{"url":"https://api.github.com/repos/aodn/aodn-portal/issues/1485","repository_url":"https://api.github.com/repos/aodn/aodn-portal","labels_url":"https://api.github.com/repos/aodn/aodn-portal/issues/1485/labels{/name}","comments_url":"https://api.github.com/repos/aodn/aodn-portal/issues/1485/comments","events_url":"https://api.github.com/repos/aodn/aodn-portal/issues/1485/events","html_url":"https://github.com/aodn/aodn-portal/issues/1485","id":49028007,"number":1485,"title":"estimateSizeForLayer ajax request is made twice per collection","user":{"login":"pmbohm","id":1066981,"avatar_url":"https://avatars.githubusercontent.com/u/1066981?v=3","gravatar_id":"","url":"https://api.github.com/users/pmbohm","html_url":"https://github.com/pmbohm","followers_url":"https://api.github.com/users/pmbohm/followers","following_url":"https://api.github.com/users/pmbohm/following{/other_user}","gists_url":"https://api.github.com/users/pmbohm/gists{/gist_id}","starred_url":"https://api.github.com/users/pmbohm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmbohm/subscriptions","organizations_url":"https://api.github.com/users/pmbohm/orgs","repos_url":"https://api.github.com/users/pmbohm/repos","events_url":"https://api.github.com/users/pmbohm/events{/privacy}","received_events_url":"https://api.github.com/users/pmbohm/received_events","type":"User","site_admin":false},"labels":[{"id":51003262,"url":"https://api.github.com/repos/aodn/aodn-portal/labels/bug","name":"bug","color":"e11d21","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2014-11-17T02:52:09Z","updated_at":"2017-01-09T23:57:11Z","closed_at":"2017-01-09T23:57:11Z","body":"### To reproduce\n- With Firebug open\n- Add a collection to the portal\n\nNote: on Master, using Firefox with no browser caching \n### What happens\n- The estimateSizeForLayer ajax request is made on collection load and as no subsetting has yet been done this is often a complex calculation taking time to return a response and server load.\n- -- wait till this finishes and got to Step 3\n- The estimateSizeForLayer ajax request is called again even though no subsetting has been done. \n### What should happen\n- The estimateSizeForLayer ajax request should not be made on collection load. \n- The request could be made if we have a reasonable expectation that the response will come from cache? pre seed? The two requests then should be identical between collection load and Step 3\n"},"comment":{"url":"https://api.github.com/repos/aodn/aodn-portal/issues/comments/271445999","html_url":"https://github.com/aodn/aodn-portal/issues/1485#issuecomment-271445999","issue_url":"https://api.github.com/repos/aodn/aodn-portal/issues/1485","id":271445999,"user":{"login":"smancini","id":4506396,"avatar_url":"https://avatars.githubusercontent.com/u/4506396?v=3","gravatar_id":"","url":"https://api.github.com/users/smancini","html_url":"https://github.com/smancini","followers_url":"https://api.github.com/users/smancini/followers","following_url":"https://api.github.com/users/smancini/following{/other_user}","gists_url":"https://api.github.com/users/smancini/gists{/gist_id}","starred_url":"https://api.github.com/users/smancini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smancini/subscriptions","organizations_url":"https://api.github.com/users/smancini/orgs","repos_url":"https://api.github.com/users/smancini/repos","events_url":"https://api.github.com/users/smancini/events{/privacy}","received_events_url":"https://api.github.com/users/smancini/received_events","type":"User","site_admin":false},"created_at":"2017-01-09T23:57:11Z","updated_at":"2017-01-09T23:57:11Z","body":"Testing"}}
{"actor":{"display_login":"smancini"}}