{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8125","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-native","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8125/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8125/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8125/events","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/8125","id":208975261,"number":8125,"title":"Introduce pause/resume API on default file source","user":{"login":"boundsj","id":63186,"avatar_url":"https://avatars1.githubusercontent.com/u/63186?v=3","gravatar_id":"","url":"https://api.github.com/users/boundsj","html_url":"https://github.com/boundsj","followers_url":"https://api.github.com/users/boundsj/followers","following_url":"https://api.github.com/users/boundsj/following{/other_user}","gists_url":"https://api.github.com/users/boundsj/gists{/gist_id}","starred_url":"https://api.github.com/users/boundsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boundsj/subscriptions","organizations_url":"https://api.github.com/users/boundsj/orgs","repos_url":"https://api.github.com/users/boundsj/repos","events_url":"https://api.github.com/users/boundsj/events{/privacy}","received_events_url":"https://api.github.com/users/boundsj/received_events","type":"User","site_admin":false},"labels":[{"id":352634063,"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/Core%20GL","name":"Core GL","color":"000000","default":false},{"id":173948013,"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/crash","name":"crash","color":"0052cc","default":false},{"id":92400707,"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/iOS","name":"iOS","color":"000000","default":false}],"state":"closed","locked":false,"assignee":{"login":"boundsj","id":63186,"avatar_url":"https://avatars1.githubusercontent.com/u/63186?v=3","gravatar_id":"","url":"https://api.github.com/users/boundsj","html_url":"https://github.com/boundsj","followers_url":"https://api.github.com/users/boundsj/followers","following_url":"https://api.github.com/users/boundsj/following{/other_user}","gists_url":"https://api.github.com/users/boundsj/gists{/gist_id}","starred_url":"https://api.github.com/users/boundsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boundsj/subscriptions","organizations_url":"https://api.github.com/users/boundsj/orgs","repos_url":"https://api.github.com/users/boundsj/repos","events_url":"https://api.github.com/users/boundsj/events{/privacy}","received_events_url":"https://api.github.com/users/boundsj/received_events","type":"User","site_admin":false},"assignees":[{"login":"boundsj","id":63186,"avatar_url":"https://avatars1.githubusercontent.com/u/63186?v=3","gravatar_id":"","url":"https://api.github.com/users/boundsj","html_url":"https://github.com/boundsj","followers_url":"https://api.github.com/users/boundsj/followers","following_url":"https://api.github.com/users/boundsj/following{/other_user}","gists_url":"https://api.github.com/users/boundsj/gists{/gist_id}","starred_url":"https://api.github.com/users/boundsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boundsj/subscriptions","organizations_url":"https://api.github.com/users/boundsj/orgs","repos_url":"https://api.github.com/users/boundsj/repos","events_url":"https://api.github.com/users/boundsj/events{/privacy}","received_events_url":"https://api.github.com/users/boundsj/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/48","html_url":"https://github.com/mapbox/mapbox-gl-native/milestone/48","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/48/labels","id":2146469,"number":48,"title":"ios-v3.5.0","description":"Data-driven styling, internationalization, and a few goodies that come along for the ride.","creator":{"login":"1ec5","id":1231218,"avatar_url":"https://avatars3.githubusercontent.com/u/1231218?v=3","gravatar_id":"","url":"https://api.github.com/users/1ec5","html_url":"https://github.com/1ec5","followers_url":"https://api.github.com/users/1ec5/followers","following_url":"https://api.github.com/users/1ec5/following{/other_user}","gists_url":"https://api.github.com/users/1ec5/gists{/gist_id}","starred_url":"https://api.github.com/users/1ec5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ec5/subscriptions","organizations_url":"https://api.github.com/users/1ec5/orgs","repos_url":"https://api.github.com/users/1ec5/repos","events_url":"https://api.github.com/users/1ec5/events{/privacy}","received_events_url":"https://api.github.com/users/1ec5/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":66,"state":"open","created_at":"2016-11-20T11:07:53Z","updated_at":"2017-03-02T00:12:04Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2017-02-20T20:27:54Z","updated_at":"2017-03-02T17:56:06Z","closed_at":"2017-03-01T16:25:46Z","pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/pulls/8125","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/8125","diff_url":"https://github.com/mapbox/mapbox-gl-native/pull/8125.diff","patch_url":"https://github.com/mapbox/mapbox-gl-native/pull/8125.patch"},"body":"Implementation proposal for https://github.com/mapbox/mapbox-gl-native/issues/5236 to address https://github.com/mapbox/mapbox-gl-native/issues/4841\r\n \r\nThis adds an API to default file source so that it can be put in a state where requests are not checked for revalidation in sqlite (or sent over the network). The iOS map view has also been updated to use this new API when it knows that the host application is going into the background or will otherwise be in a state where it is not visible by the user.\r\n\r\nThis optimization means that the SDK will not make requests for data that the user cannot see or hit edge cases on some OSs where resources (i.e. sqlite) are not available when the host app is not visible to the user.\r\n\r\nI did not go as far down as the suggestion in https://github.com/mapbox/mapbox-gl-native/issues/5236#issuecomment-224014020. I think some notion of this API on the file source will still make sense even if we do add a similar API at the thread level.\r\n\r\nTo test this on an iOS device, I ran a primary test app with these changes in the background and then a secondary app so that I could simulate location changes in Xcode. Before the changes, if the primary app was launched in the background due to location changes, there were sqliite revalidation hits. This does not happen after these changes.\r\n\r\nThis proposed implementation keeps a file source \"active\" by default so no platform changes are required and it is completely backwards compatible. However, the Android platform might be able to take advantage of the new API in the MapView activity lifecycle methods.\r\n\r\ncc @jfirebaugh @1ec5 @tmpsantos "},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/283728684","html_url":"https://github.com/mapbox/mapbox-gl-native/pull/8125#issuecomment-283728684","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/8125","id":283728684,"user":{"login":"boundsj","id":63186,"avatar_url":"https://avatars1.githubusercontent.com/u/63186?v=3","gravatar_id":"","url":"https://api.github.com/users/boundsj","html_url":"https://github.com/boundsj","followers_url":"https://api.github.com/users/boundsj/followers","following_url":"https://api.github.com/users/boundsj/following{/other_user}","gists_url":"https://api.github.com/users/boundsj/gists{/gist_id}","starred_url":"https://api.github.com/users/boundsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boundsj/subscriptions","organizations_url":"https://api.github.com/users/boundsj/orgs","repos_url":"https://api.github.com/users/boundsj/repos","events_url":"https://api.github.com/users/boundsj/events{/privacy}","received_events_url":"https://api.github.com/users/boundsj/received_events","type":"User","site_admin":false},"created_at":"2017-03-02T17:56:06Z","updated_at":"2017-03-02T17:56:06Z","body":"Noting that this solution ended up being sort of specific to the iOS platform because it completely shuts down the Mapbox iOS SDK's map related file system and network activity in core when the host application goes into the background. This will need to be revisited when https://github.com/mapbox/mapbox-gl-native/issues/4291 is addressed.\r\n\r\nThis solution is not yet granular enough for issues like https://github.com/mapbox/mapbox-gl-native/issues/7443 or to be used on Android where things like background transfers of tiles for offline use are already supported. For now, this is probably ok since the sqlite crashes this solution intends to address are specific to the iOS platform."}}
{"actor":{"display_login":"boundsj"}}