{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/plottable/pulls/comments/32685916","id":32685916,"diff_hunk":"@@ -482,9 +503,10 @@ export class Plot extends Component {\n    */\n   public entityNearest(queryPoint: Point): Plots.PlotEntity {\n     var closestDistanceSquared = Infinity;\n-    var closest: Plots.PlotEntity;\n-    this.entities().forEach((entity) => {\n-      if (!this._visibleOnPlot(entity.datum, entity.position, entity.selection)) {\n+    var closest: LightweightPlotEntity;","path":"src/plots/plot.ts","position":56,"original_position":56,"commit_id":"d5e871b9745c114adfad3825ac5581d299b61adf","original_commit_id":"d5e871b9745c114adfad3825ac5581d299b61adf","user":{"login":"bluong","id":1448299,"avatar_url":"https://avatars.githubusercontent.com/u/1448299?v=3","gravatar_id":"","url":"https://api.github.com/users/bluong","html_url":"https://github.com/bluong","followers_url":"https://api.github.com/users/bluong/followers","following_url":"https://api.github.com/users/bluong/following{/other_user}","gists_url":"https://api.github.com/users/bluong/gists{/gist_id}","starred_url":"https://api.github.com/users/bluong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluong/subscriptions","organizations_url":"https://api.github.com/users/bluong/orgs","repos_url":"https://api.github.com/users/bluong/repos","events_url":"https://api.github.com/users/bluong/events{/privacy}","received_events_url":"https://api.github.com/users/bluong/received_events","type":"User","site_admin":false},"body":"Name variable to `closestLightweightPlotEntity`?","created_at":"2015-06-17T23:17:25Z","updated_at":"2015-06-17T23:17:25Z","html_url":"https://github.com/palantir/plottable/pull/2349#discussion_r32685916","pull_request_url":"https://api.github.com/repos/palantir/plottable/pulls/2349","_links":{"self":{"href":"https://api.github.com/repos/palantir/plottable/pulls/comments/32685916"},"html":{"href":"https://github.com/palantir/plottable/pull/2349#discussion_r32685916"},"pull_request":{"href":"https://api.github.com/repos/palantir/plottable/pulls/2349"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/plottable/pulls/2349","id":37954347,"html_url":"https://github.com/palantir/plottable/pull/2349","diff_url":"https://github.com/palantir/plottable/pull/2349.diff","patch_url":"https://github.com/palantir/plottable/pull/2349.patch","issue_url":"https://api.github.com/repos/palantir/plottable/issues/2349","number":2349,"state":"open","locked":false,"title":"Closest point performance improvement","user":{"login":"aicioara","id":3248682,"avatar_url":"https://avatars.githubusercontent.com/u/3248682?v=3","gravatar_id":"","url":"https://api.github.com/users/aicioara","html_url":"https://github.com/aicioara","followers_url":"https://api.github.com/users/aicioara/followers","following_url":"https://api.github.com/users/aicioara/following{/other_user}","gists_url":"https://api.github.com/users/aicioara/gists{/gist_id}","starred_url":"https://api.github.com/users/aicioara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aicioara/subscriptions","organizations_url":"https://api.github.com/users/aicioara/orgs","repos_url":"https://api.github.com/users/aicioara/repos","events_url":"https://api.github.com/users/aicioara/events{/privacy}","received_events_url":"https://api.github.com/users/aicioara/received_events","type":"User","site_admin":false},"body":"Closes #2195\r\n\r\nBefore: `660ms` http://jsfiddle.net/9emes3ud/2/ \r\nAfter: `1.5ms` http://jsfiddle.net/9emes3ud/3/\r\n`600x` improvement\r\n\r\nStretching:\r\n- 10 000 datapoints - `10ms` - http://jsfiddle.net/9emes3ud/4/ \r\n- 100 000 datapoints - `100ms` - http://jsfiddle.net/9emes3ud/5/ (mainly limited by the core rendering)\r\n\r\nBar Plot: \r\n- smooth: 100 bars - `1ms` - http://jsfiddle.net/9emes3ud/9/\r\n- stretch: 5000 bars - `100ms` -  http://jsfiddle.net/9emes3ud/10/\r\n\r\n---\r\n\r\nAlso as part of this PR: \r\n- Added `Utils.Window.deprecated()` tested in FF, Chrome and IE9 (does not work ok IE)\r\n- deprecated `_visibleOnPlot()`\r\n- added `protected _datumVisibleOnPlot(pixelPoint, datum, index, dataset)`\r\n\r\n---\r\n\r\nQE Notes: \r\n- Performance testing: closest points on Scatter Plot, Bar Plot, Line Plot should be improved \r\n- Regression pass: I changed the logic for retrieving closest points and for computing which data points are visible on the screen.\r\n","created_at":"2015-06-17T22:31:21Z","updated_at":"2015-06-17T23:17:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62c6792163ef79dc644d0aaebcf0877dab3731c6","assignee":{"login":"bluong","id":1448299,"avatar_url":"https://avatars.githubusercontent.com/u/1448299?v=3","gravatar_id":"","url":"https://api.github.com/users/bluong","html_url":"https://github.com/bluong","followers_url":"https://api.github.com/users/bluong/followers","following_url":"https://api.github.com/users/bluong/following{/other_user}","gists_url":"https://api.github.com/users/bluong/gists{/gist_id}","starred_url":"https://api.github.com/users/bluong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluong/subscriptions","organizations_url":"https://api.github.com/users/bluong/orgs","repos_url":"https://api.github.com/users/bluong/repos","events_url":"https://api.github.com/users/bluong/events{/privacy}","received_events_url":"https://api.github.com/users/bluong/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/palantir/plottable/milestones/39","html_url":"https://github.com/palantir/plottable/milestones/v1.1.0","labels_url":"https://api.github.com/repos/palantir/plottable/milestones/39/labels","id":1165395,"number":39,"title":"v1.1.0","description":"","creator":{"login":"christinaforney","id":1559622,"avatar_url":"https://avatars.githubusercontent.com/u/1559622?v=3","gravatar_id":"","url":"https://api.github.com/users/christinaforney","html_url":"https://github.com/christinaforney","followers_url":"https://api.github.com/users/christinaforney/followers","following_url":"https://api.github.com/users/christinaforney/following{/other_user}","gists_url":"https://api.github.com/users/christinaforney/gists{/gist_id}","starred_url":"https://api.github.com/users/christinaforney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christinaforney/subscriptions","organizations_url":"https://api.github.com/users/christinaforney/orgs","repos_url":"https://api.github.com/users/christinaforney/repos","events_url":"https://api.github.com/users/christinaforney/events{/privacy}","received_events_url":"https://api.github.com/users/christinaforney/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":2,"state":"open","created_at":"2015-06-15T17:40:23Z","updated_at":"2015-06-17T22:44:45Z","due_on":"2015-06-26T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/palantir/plottable/pulls/2349/commits","review_comments_url":"https://api.github.com/repos/palantir/plottable/pulls/2349/comments","review_comment_url":"https://api.github.com/repos/palantir/plottable/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/plottable/issues/2349/comments","statuses_url":"https://api.github.com/repos/palantir/plottable/statuses/d5e871b9745c114adfad3825ac5581d299b61adf","head":{"label":"palantir:closestPointPerf","ref":"closestPointPerf","sha":"d5e871b9745c114adfad3825ac5581d299b61adf","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":16149854,"name":"plottable","full_name":"palantir/plottable","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/plottable","description":"A library of modular chart components, built on D3","fork":false,"url":"https://api.github.com/repos/palantir/plottable","forks_url":"https://api.github.com/repos/palantir/plottable/forks","keys_url":"https://api.github.com/repos/palantir/plottable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/plottable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/plottable/teams","hooks_url":"https://api.github.com/repos/palantir/plottable/hooks","issue_events_url":"https://api.github.com/repos/palantir/plottable/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/plottable/events","assignees_url":"https://api.github.com/repos/palantir/plottable/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/plottable/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/plottable/tags","blobs_url":"https://api.github.com/repos/palantir/plottable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/plottable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/plottable/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/plottable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/plottable/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/plottable/languages","stargazers_url":"https://api.github.com/repos/palantir/plottable/stargazers","contributors_url":"https://api.github.com/repos/palantir/plottable/contributors","subscribers_url":"https://api.github.com/repos/palantir/plottable/subscribers","subscription_url":"https://api.github.com/repos/palantir/plottable/subscription","commits_url":"https://api.github.com/repos/palantir/plottable/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/plottable/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/plottable/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/plottable/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/plottable/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/plottable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/plottable/merges","archive_url":"https://api.github.com/repos/palantir/plottable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/plottable/downloads","issues_url":"https://api.github.com/repos/palantir/plottable/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/plottable/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/plottable/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/plottable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/plottable/labels{/name}","releases_url":"https://api.github.com/repos/palantir/plottable/releases{/id}","created_at":"2014-01-22T19:29:19Z","updated_at":"2015-06-17T19:17:27Z","pushed_at":"2015-06-17T22:31:22Z","git_url":"git://github.com/palantir/plottable.git","ssh_url":"git@github.com:palantir/plottable.git","clone_url":"https://github.com/palantir/plottable.git","svn_url":"https://github.com/palantir/plottable","homepage":"plottablejs.org","size":121681,"stargazers_count":513,"watchers_count":513,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":159,"forks":45,"open_issues":159,"watchers":513,"default_branch":"develop"}},"base":{"label":"palantir:develop","ref":"develop","sha":"d4036f8610e56fdf32eae0803b426be7e74d63ed","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":16149854,"name":"plottable","full_name":"palantir/plottable","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars.githubusercontent.com/u/303157?v=3","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/plottable","description":"A library of modular chart components, built on D3","fork":false,"url":"https://api.github.com/repos/palantir/plottable","forks_url":"https://api.github.com/repos/palantir/plottable/forks","keys_url":"https://api.github.com/repos/palantir/plottable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/plottable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/plottable/teams","hooks_url":"https://api.github.com/repos/palantir/plottable/hooks","issue_events_url":"https://api.github.com/repos/palantir/plottable/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/plottable/events","assignees_url":"https://api.github.com/repos/palantir/plottable/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/plottable/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/plottable/tags","blobs_url":"https://api.github.com/repos/palantir/plottable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/plottable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/plottable/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/plottable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/plottable/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/plottable/languages","stargazers_url":"https://api.github.com/repos/palantir/plottable/stargazers","contributors_url":"https://api.github.com/repos/palantir/plottable/contributors","subscribers_url":"https://api.github.com/repos/palantir/plottable/subscribers","subscription_url":"https://api.github.com/repos/palantir/plottable/subscription","commits_url":"https://api.github.com/repos/palantir/plottable/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/plottable/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/plottable/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/plottable/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/plottable/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/plottable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/plottable/merges","archive_url":"https://api.github.com/repos/palantir/plottable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/plottable/downloads","issues_url":"https://api.github.com/repos/palantir/plottable/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/plottable/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/plottable/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/plottable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/plottable/labels{/name}","releases_url":"https://api.github.com/repos/palantir/plottable/releases{/id}","created_at":"2014-01-22T19:29:19Z","updated_at":"2015-06-17T19:17:27Z","pushed_at":"2015-06-17T22:31:22Z","git_url":"git://github.com/palantir/plottable.git","ssh_url":"git@github.com:palantir/plottable.git","clone_url":"https://github.com/palantir/plottable.git","svn_url":"https://github.com/palantir/plottable","homepage":"plottablejs.org","size":121681,"stargazers_count":513,"watchers_count":513,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":159,"forks":45,"open_issues":159,"watchers":513,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/plottable/pulls/2349"},"html":{"href":"https://github.com/palantir/plottable/pull/2349"},"issue":{"href":"https://api.github.com/repos/palantir/plottable/issues/2349"},"comments":{"href":"https://api.github.com/repos/palantir/plottable/issues/2349/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/plottable/pulls/2349/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/plottable/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/plottable/pulls/2349/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/plottable/statuses/d5e871b9745c114adfad3825ac5581d299b61adf"}}}}