{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-directions/issues/36","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-directions/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-directions/issues/36/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-directions/issues/36/events","html_url":"https://github.com/mapbox/mapbox-gl-directions/issues/36","id":121548062,"number":36,"title":"Better request management on endpoint dragging","user":{"login":"mourner","id":25395,"avatar_url":"https://avatars.githubusercontent.com/u/25395?v=3","gravatar_id":"","url":"https://api.github.com/users/mourner","html_url":"https://github.com/mourner","followers_url":"https://api.github.com/users/mourner/followers","following_url":"https://api.github.com/users/mourner/following{/other_user}","gists_url":"https://api.github.com/users/mourner/gists{/gist_id}","starred_url":"https://api.github.com/users/mourner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mourner/subscriptions","organizations_url":"https://api.github.com/users/mourner/orgs","repos_url":"https://api.github.com/users/mourner/repos","events_url":"https://api.github.com/users/mourner/events{/privacy}","received_events_url":"https://api.github.com/users/mourner/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-directions/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-directions/milestones/3","html_url":"https://github.com/mapbox/mapbox-gl-directions/milestones/v1.1.0%20release","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-directions/milestones/3/labels","id":1456821,"number":3,"title":"v1.1.0 release","description":"","creator":{"login":"tristen","id":61150,"avatar_url":"https://avatars.githubusercontent.com/u/61150?v=3","gravatar_id":"","url":"https://api.github.com/users/tristen","html_url":"https://github.com/tristen","followers_url":"https://api.github.com/users/tristen/followers","following_url":"https://api.github.com/users/tristen/following{/other_user}","gists_url":"https://api.github.com/users/tristen/gists{/gist_id}","starred_url":"https://api.github.com/users/tristen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tristen/subscriptions","organizations_url":"https://api.github.com/users/tristen/orgs","repos_url":"https://api.github.com/users/tristen/repos","events_url":"https://api.github.com/users/tristen/events{/privacy}","received_events_url":"https://api.github.com/users/tristen/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":1,"state":"open","created_at":"2015-12-11T22:55:31Z","updated_at":"2015-12-16T04:32:28Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-12-10T18:24:48Z","updated_at":"2015-12-16T06:39:46Z","closed_at":null,"body":"@tristen Currently the endpoint dragging is very laggy, because it sends too many requests. We can drastically improve the experience by doing two things:\r\n\r\n1. Throttle or debounce the requests. They shouldn't fire more often than 200ms, maybe more.\r\n2. Cancel outdated requests — when you move the mouse, only the latest position is relevant but requests for all previous points during the move still hang until completed. See GL JS for an example of request canceling (we do this for tiles).\r\n\r\n![image](https://cloud.githubusercontent.com/assets/25395/11724258/d4f7281c-9f27-11e5-8e95-f9fcd8ffb20e.png)\r\n"},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-directions/issues/comments/165015082","html_url":"https://github.com/mapbox/mapbox-gl-directions/issues/36#issuecomment-165015082","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-directions/issues/36","id":165015082,"user":{"login":"mourner","id":25395,"avatar_url":"https://avatars.githubusercontent.com/u/25395?v=3","gravatar_id":"","url":"https://api.github.com/users/mourner","html_url":"https://github.com/mourner","followers_url":"https://api.github.com/users/mourner/followers","following_url":"https://api.github.com/users/mourner/following{/other_user}","gists_url":"https://api.github.com/users/mourner/gists{/gist_id}","starred_url":"https://api.github.com/users/mourner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mourner/subscriptions","organizations_url":"https://api.github.com/users/mourner/orgs","repos_url":"https://api.github.com/users/mourner/repos","events_url":"https://api.github.com/users/mourner/events{/privacy}","received_events_url":"https://api.github.com/users/mourner/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T06:39:46Z","updated_at":"2015-12-16T06:39:46Z","body":"@tristen we [just call](https://github.com/mapbox/mapbox-gl-js/blob/ba9d1095ce5509595a0014a18037c4a3ba3b879d/js/source/worker.js#L66) `xhr.abort()` whenever we loose interest in a response of a request that hasn't completed yet."}}