{"action":"created","comment":{"url":"https://api.github.com/repos/ornicar/lila/pulls/comments/132978263","pull_request_review_id":56109558,"id":132978263,"diff_hunk":"@@ -69,19 +69,13 @@ export default function(opts: CevalOpts): CevalController {\n     };\n   })();\n \n-  const throttledEmit = throttle(150, false, opts.emit);\n-\n-  const onEmit = function(ev: Tree.ClientEval, work: Work) {\n+  const onEmit = throttle(500, false, (ev: Tree.ClientEval, work: Work) => {\n     sortPvsInPlace(ev.pvs, (work.ply % 2 === (work.threatMode ? 1 : 0)) ? 'white' : 'black');\n     npsRecorder(ev);\n     curEval = ev;\n-    throttledEmit(ev, work);\n-    publish(ev);\n-  };\n-\n-  const publish = function(ev: Tree.ClientEval) {\n-    if (ev.depth === 12) window.lichess.storage.set('ceval.fen', ev.fen);\n-  };\n+    opts.emit(ev, work);\n+    if (ev.millis > 1000 && ev.millis < 5000) window.lichess.storage.set('ceval.fen', ev.fen);","path":"ui/ceval/src/ctrl.ts","position":19,"original_position":19,"commit_id":"bc4cb33453f991bb088db6f1464a4c133bdf10ab","original_commit_id":"321e42444ccca28ab551a0227d178877fdcdc051","user":{"login":"ornicar","id":140370,"avatar_url":"https://avatars0.githubusercontent.com/u/140370?v=4","gravatar_id":"","url":"https://api.github.com/users/ornicar","html_url":"https://github.com/ornicar","followers_url":"https://api.github.com/users/ornicar/followers","following_url":"https://api.github.com/users/ornicar/following{/other_user}","gists_url":"https://api.github.com/users/ornicar/gists{/gist_id}","starred_url":"https://api.github.com/users/ornicar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ornicar/subscriptions","organizations_url":"https://api.github.com/users/ornicar/orgs","repos_url":"https://api.github.com/users/ornicar/repos","events_url":"https://api.github.com/users/ornicar/events{/privacy}","received_events_url":"https://api.github.com/users/ornicar/received_events","type":"User","site_admin":false},"body":"So we're now emitting `ceval.fen` multiple times instead of just once, now?","created_at":"2017-08-14T15:16:51Z","updated_at":"2017-08-14T15:16:52Z","html_url":"https://github.com/ornicar/lila/pull/3432#discussion_r132978263","pull_request_url":"https://api.github.com/repos/ornicar/lila/pulls/3432","_links":{"self":{"href":"https://api.github.com/repos/ornicar/lila/pulls/comments/132978263"},"html":{"href":"https://github.com/ornicar/lila/pull/3432#discussion_r132978263"},"pull_request":{"href":"https://api.github.com/repos/ornicar/lila/pulls/3432"}}},"pull_request":{"url":"https://api.github.com/repos/ornicar/lila/pulls/3432","id":135437776,"html_url":"https://github.com/ornicar/lila/pull/3432","diff_url":"https://github.com/ornicar/lila/pull/3432.diff","patch_url":"https://github.com/ornicar/lila/pull/3432.patch","issue_url":"https://api.github.com/repos/ornicar/lila/issues/3432","number":3432,"state":"open","locked":false,"title":"Improve ceval emit throttling","user":{"login":"isaacl","id":1027886,"avatar_url":"https://avatars2.githubusercontent.com/u/1027886?v=4","gravatar_id":"","url":"https://api.github.com/users/isaacl","html_url":"https://github.com/isaacl","followers_url":"https://api.github.com/users/isaacl/followers","following_url":"https://api.github.com/users/isaacl/following{/other_user}","gists_url":"https://api.github.com/users/isaacl/gists{/gist_id}","starred_url":"https://api.github.com/users/isaacl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaacl/subscriptions","organizations_url":"https://api.github.com/users/isaacl/orgs","repos_url":"https://api.github.com/users/isaacl/repos","events_url":"https://api.github.com/users/isaacl/events{/privacy}","received_events_url":"https://api.github.com/users/isaacl/received_events","type":"User","site_admin":false},"body":"Reduce processing and arrow draw rate to 500ms, using leading edge throttling.\r\n\r\nThis throttling reduces redraw during piece animation (when navigating analyze with arrows, for example), and ensures evals stay visible for at least 500ms to make the display feel more solid.","created_at":"2017-08-11T23:56:24Z","updated_at":"2017-08-14T15:16:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c39abf1865a79eaba41a3fc714e6dfe86239e775","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ornicar/lila/pulls/3432/commits","review_comments_url":"https://api.github.com/repos/ornicar/lila/pulls/3432/comments","review_comment_url":"https://api.github.com/repos/ornicar/lila/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ornicar/lila/issues/3432/comments","statuses_url":"https://api.github.com/repos/ornicar/lila/statuses/bc4cb33453f991bb088db6f1464a4c133bdf10ab","head":{"label":"ornicar:thottleCevalMore","ref":"thottleCevalMore","sha":"bc4cb33453f991bb088db6f1464a4c133bdf10ab","user":{"login":"ornicar","id":140370,"avatar_url":"https://avatars0.githubusercontent.com/u/140370?v=4","gravatar_id":"","url":"https://api.github.com/users/ornicar","html_url":"https://github.com/ornicar","followers_url":"https://api.github.com/users/ornicar/followers","following_url":"https://api.github.com/users/ornicar/following{/other_user}","gists_url":"https://api.github.com/users/ornicar/gists{/gist_id}","starred_url":"https://api.github.com/users/ornicar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ornicar/subscriptions","organizations_url":"https://api.github.com/users/ornicar/orgs","repos_url":"https://api.github.com/users/ornicar/repos","events_url":"https://api.github.com/users/ornicar/events{/privacy}","received_events_url":"https://api.github.com/users/ornicar/received_events","type":"User","site_admin":false},"repo":{"id":3507455,"name":"lila","full_name":"ornicar/lila","owner":{"login":"ornicar","id":140370,"avatar_url":"https://avatars0.githubusercontent.com/u/140370?v=4","gravatar_id":"","url":"https://api.github.com/users/ornicar","html_url":"https://github.com/ornicar","followers_url":"https://api.github.com/users/ornicar/followers","following_url":"https://api.github.com/users/ornicar/following{/other_user}","gists_url":"https://api.github.com/users/ornicar/gists{/gist_id}","starred_url":"https://api.github.com/users/ornicar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ornicar/subscriptions","organizations_url":"https://api.github.com/users/ornicar/orgs","repos_url":"https://api.github.com/users/ornicar/repos","events_url":"https://api.github.com/users/ornicar/events{/privacy}","received_events_url":"https://api.github.com/users/ornicar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ornicar/lila","description":"lichess.org: the forever free, adless and open source chess server.","fork":false,"url":"https://api.github.com/repos/ornicar/lila","forks_url":"https://api.github.com/repos/ornicar/lila/forks","keys_url":"https://api.github.com/repos/ornicar/lila/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ornicar/lila/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ornicar/lila/teams","hooks_url":"https://api.github.com/repos/ornicar/lila/hooks","issue_events_url":"https://api.github.com/repos/ornicar/lila/issues/events{/number}","events_url":"https://api.github.com/repos/ornicar/lila/events","assignees_url":"https://api.github.com/repos/ornicar/lila/assignees{/user}","branches_url":"https://api.github.com/repos/ornicar/lila/branches{/branch}","tags_url":"https://api.github.com/repos/ornicar/lila/tags","blobs_url":"https://api.github.com/repos/ornicar/lila/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ornicar/lila/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ornicar/lila/git/refs{/sha}","trees_url":"https://api.github.com/repos/ornicar/lila/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ornicar/lila/statuses/{sha}","languages_url":"https://api.github.com/repos/ornicar/lila/languages","stargazers_url":"https://api.github.com/repos/ornicar/lila/stargazers","contributors_url":"https://api.github.com/repos/ornicar/lila/contributors","subscribers_url":"https://api.github.com/repos/ornicar/lila/subscribers","subscription_url":"https://api.github.com/repos/ornicar/lila/subscription","commits_url":"https://api.github.com/repos/ornicar/lila/commits{/sha}","git_commits_url":"https://api.github.com/repos/ornicar/lila/git/commits{/sha}","comments_url":"https://api.github.com/repos/ornicar/lila/comments{/number}","issue_comment_url":"https://api.github.com/repos/ornicar/lila/issues/comments{/number}","contents_url":"https://api.github.com/repos/ornicar/lila/contents/{+path}","compare_url":"https://api.github.com/repos/ornicar/lila/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ornicar/lila/merges","archive_url":"https://api.github.com/repos/ornicar/lila/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ornicar/lila/downloads","issues_url":"https://api.github.com/repos/ornicar/lila/issues{/number}","pulls_url":"https://api.github.com/repos/ornicar/lila/pulls{/number}","milestones_url":"https://api.github.com/repos/ornicar/lila/milestones{/number}","notifications_url":"https://api.github.com/repos/ornicar/lila/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ornicar/lila/labels{/name}","releases_url":"https://api.github.com/repos/ornicar/lila/releases{/id}","deployments_url":"https://api.github.com/repos/ornicar/lila/deployments","created_at":"2012-02-21T19:46:55Z","updated_at":"2017-08-14T09:01:29Z","pushed_at":"2017-08-14T14:30:02Z","git_url":"git://github.com/ornicar/lila.git","ssh_url":"git@github.com:ornicar/lila.git","clone_url":"https://github.com/ornicar/lila.git","svn_url":"https://github.com/ornicar/lila","homepage":"https://lichess.org","size":144269,"stargazers_count":3318,"watchers_count":3318,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":560,"mirror_url":null,"open_issues_count":362,"forks":560,"open_issues":362,"watchers":3318,"default_branch":"master"}},"base":{"label":"ornicar:master","ref":"master","sha":"18b81f8588582400c837c7482e0fad522639441d","user":{"login":"ornicar","id":140370,"avatar_url":"https://avatars0.githubusercontent.com/u/140370?v=4","gravatar_id":"","url":"https://api.github.com/users/ornicar","html_url":"https://github.com/ornicar","followers_url":"https://api.github.com/users/ornicar/followers","following_url":"https://api.github.com/users/ornicar/following{/other_user}","gists_url":"https://api.github.com/users/ornicar/gists{/gist_id}","starred_url":"https://api.github.com/users/ornicar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ornicar/subscriptions","organizations_url":"https://api.github.com/users/ornicar/orgs","repos_url":"https://api.github.com/users/ornicar/repos","events_url":"https://api.github.com/users/ornicar/events{/privacy}","received_events_url":"https://api.github.com/users/ornicar/received_events","type":"User","site_admin":false},"repo":{"id":3507455,"name":"lila","full_name":"ornicar/lila","owner":{"login":"ornicar","id":140370,"avatar_url":"https://avatars0.githubusercontent.com/u/140370?v=4","gravatar_id":"","url":"https://api.github.com/users/ornicar","html_url":"https://github.com/ornicar","followers_url":"https://api.github.com/users/ornicar/followers","following_url":"https://api.github.com/users/ornicar/following{/other_user}","gists_url":"https://api.github.com/users/ornicar/gists{/gist_id}","starred_url":"https://api.github.com/users/ornicar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ornicar/subscriptions","organizations_url":"https://api.github.com/users/ornicar/orgs","repos_url":"https://api.github.com/users/ornicar/repos","events_url":"https://api.github.com/users/ornicar/events{/privacy}","received_events_url":"https://api.github.com/users/ornicar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ornicar/lila","description":"lichess.org: the forever free, adless and open source chess server.","fork":false,"url":"https://api.github.com/repos/ornicar/lila","forks_url":"https://api.github.com/repos/ornicar/lila/forks","keys_url":"https://api.github.com/repos/ornicar/lila/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ornicar/lila/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ornicar/lila/teams","hooks_url":"https://api.github.com/repos/ornicar/lila/hooks","issue_events_url":"https://api.github.com/repos/ornicar/lila/issues/events{/number}","events_url":"https://api.github.com/repos/ornicar/lila/events","assignees_url":"https://api.github.com/repos/ornicar/lila/assignees{/user}","branches_url":"https://api.github.com/repos/ornicar/lila/branches{/branch}","tags_url":"https://api.github.com/repos/ornicar/lila/tags","blobs_url":"https://api.github.com/repos/ornicar/lila/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ornicar/lila/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ornicar/lila/git/refs{/sha}","trees_url":"https://api.github.com/repos/ornicar/lila/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ornicar/lila/statuses/{sha}","languages_url":"https://api.github.com/repos/ornicar/lila/languages","stargazers_url":"https://api.github.com/repos/ornicar/lila/stargazers","contributors_url":"https://api.github.com/repos/ornicar/lila/contributors","subscribers_url":"https://api.github.com/repos/ornicar/lila/subscribers","subscription_url":"https://api.github.com/repos/ornicar/lila/subscription","commits_url":"https://api.github.com/repos/ornicar/lila/commits{/sha}","git_commits_url":"https://api.github.com/repos/ornicar/lila/git/commits{/sha}","comments_url":"https://api.github.com/repos/ornicar/lila/comments{/number}","issue_comment_url":"https://api.github.com/repos/ornicar/lila/issues/comments{/number}","contents_url":"https://api.github.com/repos/ornicar/lila/contents/{+path}","compare_url":"https://api.github.com/repos/ornicar/lila/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ornicar/lila/merges","archive_url":"https://api.github.com/repos/ornicar/lila/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ornicar/lila/downloads","issues_url":"https://api.github.com/repos/ornicar/lila/issues{/number}","pulls_url":"https://api.github.com/repos/ornicar/lila/pulls{/number}","milestones_url":"https://api.github.com/repos/ornicar/lila/milestones{/number}","notifications_url":"https://api.github.com/repos/ornicar/lila/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ornicar/lila/labels{/name}","releases_url":"https://api.github.com/repos/ornicar/lila/releases{/id}","deployments_url":"https://api.github.com/repos/ornicar/lila/deployments","created_at":"2012-02-21T19:46:55Z","updated_at":"2017-08-14T09:01:29Z","pushed_at":"2017-08-14T14:30:02Z","git_url":"git://github.com/ornicar/lila.git","ssh_url":"git@github.com:ornicar/lila.git","clone_url":"https://github.com/ornicar/lila.git","svn_url":"https://github.com/ornicar/lila","homepage":"https://lichess.org","size":144269,"stargazers_count":3318,"watchers_count":3318,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":560,"mirror_url":null,"open_issues_count":362,"forks":560,"open_issues":362,"watchers":3318,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ornicar/lila/pulls/3432"},"html":{"href":"https://github.com/ornicar/lila/pull/3432"},"issue":{"href":"https://api.github.com/repos/ornicar/lila/issues/3432"},"comments":{"href":"https://api.github.com/repos/ornicar/lila/issues/3432/comments"},"review_comments":{"href":"https://api.github.com/repos/ornicar/lila/pulls/3432/comments"},"review_comment":{"href":"https://api.github.com/repos/ornicar/lila/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ornicar/lila/pulls/3432/commits"},"statuses":{"href":"https://api.github.com/repos/ornicar/lila/statuses/bc4cb33453f991bb088db6f1464a4c133bdf10ab"}}}}
{"actor":{"display_login":"ornicar"}}