{"action":"created","comment":{"url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/comments/79645705","id":79645705,"diff_hunk":"@@ -131,6 +143,39 @@ class CanvasLayer {\n     return canvas;\n   }\n \n+  getVesselAtPixelLocation(x, y) {\n+    this.playbackData.forEach(canvasPlaybackData => {\n+      const canvas = canvasPlaybackData.canvas;\n+      const rect = canvas.getBoundingClientRect();\n+      if (x > rect.left && y > rect.top && x <= rect.right && y <= rect.bottom) {\n+        return this._getCanvasVesselAt(canvas, x - rect.left, y - rect.top);\n+      }\n+    });\n+  }\n+\n+  _getCanvasVesselAt(canvas, x, y) {","path":"app/src/components/Layers/CanvasLayer.jsx","position":144,"original_position":144,"commit_id":"f8c6c3c3198d249c644ebb5897d8433e77bac578","original_commit_id":"f8c6c3c3198d249c644ebb5897d8433e77bac578","user":{"login":"nerik","id":1583415,"avatar_url":"https://avatars.githubusercontent.com/u/1583415?v=3","gravatar_id":"","url":"https://api.github.com/users/nerik","html_url":"https://github.com/nerik","followers_url":"https://api.github.com/users/nerik/followers","following_url":"https://api.github.com/users/nerik/following{/other_user}","gists_url":"https://api.github.com/users/nerik/gists{/gist_id}","starred_url":"https://api.github.com/users/nerik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerik/subscriptions","organizations_url":"https://api.github.com/users/nerik/orgs","repos_url":"https://api.github.com/users/nerik/repos","events_url":"https://api.github.com/users/nerik/events{/privacy}","received_events_url":"https://api.github.com/users/nerik/received_events","type":"User","site_admin":false},"body":"Yeah sorry, I was in the middle of this. I'll remove the last commit from the PR, merge, and open another WIP one.","created_at":"2016-09-20T15:54:27Z","updated_at":"2016-09-20T15:54:27Z","html_url":"https://github.com/Vizzuality/GlobalFishingWatch/pull/294#discussion_r79645705","pull_request_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/294","_links":{"self":{"href":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/comments/79645705"},"html":{"href":"https://github.com/Vizzuality/GlobalFishingWatch/pull/294#discussion_r79645705"},"pull_request":{"href":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/294"}}},"pull_request":{"url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/294","id":85006362,"html_url":"https://github.com/Vizzuality/GlobalFishingWatch/pull/294","diff_url":"https://github.com/Vizzuality/GlobalFishingWatch/pull/294.diff","patch_url":"https://github.com/Vizzuality/GlobalFishingWatch/pull/294.patch","issue_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues/294","number":294,"state":"open","locked":false,"title":"Map perfs","user":{"login":"nerik","id":1583415,"avatar_url":"https://avatars.githubusercontent.com/u/1583415?v=3","gravatar_id":"","url":"https://api.github.com/users/nerik","html_url":"https://github.com/nerik","followers_url":"https://api.github.com/users/nerik/followers","following_url":"https://api.github.com/users/nerik/following{/other_user}","gists_url":"https://api.github.com/users/nerik/gists{/gist_id}","starred_url":"https://api.github.com/users/nerik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerik/subscriptions","organizations_url":"https://api.github.com/users/nerik/orgs","repos_url":"https://api.github.com/users/nerik/repos","events_url":"https://api.github.com/users/nerik/events{/privacy}","received_events_url":"https://api.github.com/users/nerik/received_events","type":"User","site_admin":false},"body":"\r\nThis PR focuses only on the vessels layer and does the following:\r\n- makes initial post-tile-loading logic ~10 times faster (5s to 500ms). The bottleneck is clearly now tile data loading times, which is something we don't have control over\r\n- makes frame rendering ~5 times faster, which gets us close to 30 fps displaying 100 days worth of vessel points (on my more than average MB pro; Chrome). Note: to achieve this I simplified greatly the drawing sequence, ie all points have the same fill style (opacity and color). Basically, draw-draw-draw-fill, instead of draw-fill-draw-fill-draw-fill.\r\n  - We'll need to see with the client if this is really needed (the question is: can you really make a difference between a .5 and a .7 opacity vessel point?)\r\n  - if this is a requirement, more logic will be needed to group points in opacity buckets (doing draw-draw-draw-fill for each opacity bucket, ie .5, .75 and 1 for example). This will need more work and will have a cost on performance (but it will still be faster than before)\r\n  - points are now drawn with circles instead of little squares, allowing us to easily encode a value in the circle diameter/area\r\n- removes and cleaned up lot of code, plus some stability fixes (tiles not updating, etc)\r\n\r\nNext steps:\r\n\r\n- revise track layer:\r\n  - logic has to be revised to work with the new time indexes used in vessel layer (currently track layers are broken)\r\n  - optimize performance\r\n  - work on styling (circles should look the same as in the vessel layer, work on colors, line style, etc). check with Dani\r\n  - show tracks on hover as in the prototype?\r\n- vessel layer render style improvements:\r\n  - experiment with different blend modes and check performance costs\r\n  - check with Dani\r\n- We still have gaps/borders between tiles which is due to 2 things:\r\n  - something is wrong with the data (a tile full of points is a neighbour of a tile almost empty). This is due to inconsistencies in the data. Make sure it's not on our side, if not check with the client\r\n  - tile borders are visible because a point drawn too close to the tile limit it will get cut off. The only fix is to use a full screen canvas instead of tiles, but this is a huge change and I'm not sure how it would perform. Check with David Inga\r\n- Fix timeline glitches and figure out outer bounds thing.\r\n","created_at":"2016-09-13T08:38:46Z","updated_at":"2016-09-20T15:54:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab91b506a78c9bcb2b9fecd7aa13d49fdb5ea7ac","assignee":{"login":"tiagojsag","id":973964,"avatar_url":"https://avatars.githubusercontent.com/u/973964?v=3","gravatar_id":"","url":"https://api.github.com/users/tiagojsag","html_url":"https://github.com/tiagojsag","followers_url":"https://api.github.com/users/tiagojsag/followers","following_url":"https://api.github.com/users/tiagojsag/following{/other_user}","gists_url":"https://api.github.com/users/tiagojsag/gists{/gist_id}","starred_url":"https://api.github.com/users/tiagojsag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiagojsag/subscriptions","organizations_url":"https://api.github.com/users/tiagojsag/orgs","repos_url":"https://api.github.com/users/tiagojsag/repos","events_url":"https://api.github.com/users/tiagojsag/events{/privacy}","received_events_url":"https://api.github.com/users/tiagojsag/received_events","type":"User","site_admin":false},"assignees":[{"login":"tiagojsag","id":973964,"avatar_url":"https://avatars.githubusercontent.com/u/973964?v=3","gravatar_id":"","url":"https://api.github.com/users/tiagojsag","html_url":"https://github.com/tiagojsag","followers_url":"https://api.github.com/users/tiagojsag/followers","following_url":"https://api.github.com/users/tiagojsag/following{/other_user}","gists_url":"https://api.github.com/users/tiagojsag/gists{/gist_id}","starred_url":"https://api.github.com/users/tiagojsag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiagojsag/subscriptions","organizations_url":"https://api.github.com/users/tiagojsag/orgs","repos_url":"https://api.github.com/users/tiagojsag/repos","events_url":"https://api.github.com/users/tiagojsag/events{/privacy}","received_events_url":"https://api.github.com/users/tiagojsag/received_events","type":"User","site_admin":false},{"login":"clementprdhomme","id":6073968,"avatar_url":"https://avatars.githubusercontent.com/u/6073968?v=3","gravatar_id":"","url":"https://api.github.com/users/clementprdhomme","html_url":"https://github.com/clementprdhomme","followers_url":"https://api.github.com/users/clementprdhomme/followers","following_url":"https://api.github.com/users/clementprdhomme/following{/other_user}","gists_url":"https://api.github.com/users/clementprdhomme/gists{/gist_id}","starred_url":"https://api.github.com/users/clementprdhomme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clementprdhomme/subscriptions","organizations_url":"https://api.github.com/users/clementprdhomme/orgs","repos_url":"https://api.github.com/users/clementprdhomme/repos","events_url":"https://api.github.com/users/clementprdhomme/events{/privacy}","received_events_url":"https://api.github.com/users/clementprdhomme/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/294/commits","review_comments_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/294/comments","review_comment_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues/294/comments","statuses_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/statuses/f8c6c3c3198d249c644ebb5897d8433e77bac578","head":{"label":"Vizzuality:feature/map-perfs","ref":"feature/map-perfs","sha":"f8c6c3c3198d249c644ebb5897d8433e77bac578","user":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars.githubusercontent.com/u/305994?v=3","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"repo":{"id":59182220,"name":"GlobalFishingWatch","full_name":"Vizzuality/GlobalFishingWatch","owner":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars.githubusercontent.com/u/305994?v=3","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vizzuality/GlobalFishingWatch","description":"","fork":false,"url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch","forks_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/forks","keys_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/teams","hooks_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/hooks","issue_events_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues/events{/number}","events_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/events","assignees_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/assignees{/user}","branches_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/branches{/branch}","tags_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/tags","blobs_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/statuses/{sha}","languages_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/languages","stargazers_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/stargazers","contributors_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/contributors","subscribers_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/subscribers","subscription_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/subscription","commits_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/contents/{+path}","compare_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/merges","archive_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/downloads","issues_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues{/number}","pulls_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls{/number}","milestones_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/milestones{/number}","notifications_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/labels{/name}","releases_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/releases{/id}","deployments_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/deployments","created_at":"2016-05-19T07:03:43Z","updated_at":"2016-07-20T14:45:28Z","pushed_at":"2016-09-20T15:53:28Z","git_url":"git://github.com/Vizzuality/GlobalFishingWatch.git","ssh_url":"git@github.com:Vizzuality/GlobalFishingWatch.git","clone_url":"https://github.com/Vizzuality/GlobalFishingWatch.git","svn_url":"https://github.com/Vizzuality/GlobalFishingWatch","homepage":null,"size":77728,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"Vizzuality:mapster","ref":"mapster","sha":"27ad3a9693c542e857763a416d29a88107e575a8","user":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars.githubusercontent.com/u/305994?v=3","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"repo":{"id":59182220,"name":"GlobalFishingWatch","full_name":"Vizzuality/GlobalFishingWatch","owner":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars.githubusercontent.com/u/305994?v=3","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vizzuality/GlobalFishingWatch","description":"","fork":false,"url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch","forks_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/forks","keys_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/teams","hooks_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/hooks","issue_events_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues/events{/number}","events_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/events","assignees_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/assignees{/user}","branches_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/branches{/branch}","tags_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/tags","blobs_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/statuses/{sha}","languages_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/languages","stargazers_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/stargazers","contributors_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/contributors","subscribers_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/subscribers","subscription_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/subscription","commits_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/contents/{+path}","compare_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/merges","archive_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/downloads","issues_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues{/number}","pulls_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls{/number}","milestones_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/milestones{/number}","notifications_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/labels{/name}","releases_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/releases{/id}","deployments_url":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/deployments","created_at":"2016-05-19T07:03:43Z","updated_at":"2016-07-20T14:45:28Z","pushed_at":"2016-09-20T15:53:28Z","git_url":"git://github.com/Vizzuality/GlobalFishingWatch.git","ssh_url":"git@github.com:Vizzuality/GlobalFishingWatch.git","clone_url":"https://github.com/Vizzuality/GlobalFishingWatch.git","svn_url":"https://github.com/Vizzuality/GlobalFishingWatch","homepage":null,"size":77728,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/294"},"html":{"href":"https://github.com/Vizzuality/GlobalFishingWatch/pull/294"},"issue":{"href":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues/294"},"comments":{"href":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/issues/294/comments"},"review_comments":{"href":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/294/comments"},"review_comment":{"href":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/pulls/294/commits"},"statuses":{"href":"https://api.github.com/repos/Vizzuality/GlobalFishingWatch/statuses/f8c6c3c3198d249c644ebb5897d8433e77bac578"}}}}
{"actor":{"display_login":"nerik"}}