{"action":"created","issue":{"url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/313","repository_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15","labels_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/313/comments","events_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/313/events","html_url":"https://github.com/USGS-VIZLAB/water-use-15/issues/313","id":320399360,"number":313,"title":"Smart image sizing and loading for key stories and footer","user":{"login":"jread-usgs","id":2349007,"avatar_url":"https://avatars2.githubusercontent.com/u/2349007?v=4","gravatar_id":"","url":"https://api.github.com/users/jread-usgs","html_url":"https://github.com/jread-usgs","followers_url":"https://api.github.com/users/jread-usgs/followers","following_url":"https://api.github.com/users/jread-usgs/following{/other_user}","gists_url":"https://api.github.com/users/jread-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/jread-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jread-usgs/subscriptions","organizations_url":"https://api.github.com/users/jread-usgs/orgs","repos_url":"https://api.github.com/users/jread-usgs/repos","events_url":"https://api.github.com/users/jread-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/jread-usgs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mwernimont","id":6390096,"avatar_url":"https://avatars0.githubusercontent.com/u/6390096?v=4","gravatar_id":"","url":"https://api.github.com/users/mwernimont","html_url":"https://github.com/mwernimont","followers_url":"https://api.github.com/users/mwernimont/followers","following_url":"https://api.github.com/users/mwernimont/following{/other_user}","gists_url":"https://api.github.com/users/mwernimont/gists{/gist_id}","starred_url":"https://api.github.com/users/mwernimont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwernimont/subscriptions","organizations_url":"https://api.github.com/users/mwernimont/orgs","repos_url":"https://api.github.com/users/mwernimont/repos","events_url":"https://api.github.com/users/mwernimont/events{/privacy}","received_events_url":"https://api.github.com/users/mwernimont/received_events","type":"User","site_admin":false},"assignees":[{"login":"mwernimont","id":6390096,"avatar_url":"https://avatars0.githubusercontent.com/u/6390096?v=4","gravatar_id":"","url":"https://api.github.com/users/mwernimont","html_url":"https://github.com/mwernimont","followers_url":"https://api.github.com/users/mwernimont/followers","following_url":"https://api.github.com/users/mwernimont/following{/other_user}","gists_url":"https://api.github.com/users/mwernimont/gists{/gist_id}","starred_url":"https://api.github.com/users/mwernimont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwernimont/subscriptions","organizations_url":"https://api.github.com/users/mwernimont/orgs","repos_url":"https://api.github.com/users/mwernimont/repos","events_url":"https://api.github.com/users/mwernimont/events{/privacy}","received_events_url":"https://api.github.com/users/mwernimont/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-05-04T19:28:34Z","updated_at":"2018-05-21T11:32:16Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"this is going to take over for #304 \r\n\r\nWe have footer images and water use stories that are 1.3 MB (desktop story), 757 KB (mobile story right), 574 KB (mobile story), 117 KB (the previous WU viz's thumbnail in the footer), and 47.3 KB (Maria thumbnail in the footer). \r\n\r\nFor reference, D3 is 72.8 KB and county_boundaries_USA.json are 242 KB\r\n\r\nThe three WU story jpegs are the three biggest files the viz loads initially (high res counties are big too, but they aren't loaded until you zoom). \r\n\r\nThese three images seem to get loaded before we start loading the state data or the county centroids, and therefore they are likely slowing the \"time to first paint\". The implications are approximately a > 1.5s delay on network for a desktop machine and a much larger delay on mobile cell data. \r\n\r\n - [x] make it so either the single desktop image is used/loaded (wide) or two (narrow) for water use\r\n - [ ] shrink the two mobile files (they are likely higher resolution than is needed for the narrow view\r\n - [x] modify the way these resources are fetched by the browser so that they are queued later, either by implementing some lazy loading solution (there are many options including starting w/ a lower-res/blurry image and replacing w/ higher res when it is in viewport) or just making sure they are called for _after_ the map is built. \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/comments/390629048","html_url":"https://github.com/USGS-VIZLAB/water-use-15/issues/313#issuecomment-390629048","issue_url":"https://api.github.com/repos/USGS-VIZLAB/water-use-15/issues/313","id":390629048,"user":{"login":"lindsaycarr","id":13220910,"avatar_url":"https://avatars3.githubusercontent.com/u/13220910?v=4","gravatar_id":"","url":"https://api.github.com/users/lindsaycarr","html_url":"https://github.com/lindsaycarr","followers_url":"https://api.github.com/users/lindsaycarr/followers","following_url":"https://api.github.com/users/lindsaycarr/following{/other_user}","gists_url":"https://api.github.com/users/lindsaycarr/gists{/gist_id}","starred_url":"https://api.github.com/users/lindsaycarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindsaycarr/subscriptions","organizations_url":"https://api.github.com/users/lindsaycarr/orgs","repos_url":"https://api.github.com/users/lindsaycarr/repos","events_url":"https://api.github.com/users/lindsaycarr/events{/privacy}","received_events_url":"https://api.github.com/users/lindsaycarr/received_events","type":"User","site_admin":false},"created_at":"2018-05-21T11:32:16Z","updated_at":"2018-05-21T11:32:16Z","author_association":"CONTRIBUTOR","body":"So I see we fixed the issue with two 4's above by having 4a and 4b, and the footer images are indeed lazy-loading.\r\n\r\nLooks like there one thing left: shrink width of that mobile image to 600px. @mwernimont do you see any reason not to do that, and if not, is that something you can do?"}}
{"actor":{"display_login":"lindsaycarr"}}