{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/7771","repository_url":"https://api.github.com/repos/bokeh/bokeh","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/7771/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/7771/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/7771/events","html_url":"https://github.com/bokeh/bokeh/issues/7771","id":312337950,"number":7771,"title":"repaint() in plot_canvas.coffee causing significant lag","user":{"login":"cutright","id":4778878,"avatar_url":"https://avatars2.githubusercontent.com/u/4778878?v=4","gravatar_id":"","url":"https://api.github.com/users/cutright","html_url":"https://github.com/cutright","followers_url":"https://api.github.com/users/cutright/followers","following_url":"https://api.github.com/users/cutright/following{/other_user}","gists_url":"https://api.github.com/users/cutright/gists{/gist_id}","starred_url":"https://api.github.com/users/cutright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cutright/subscriptions","organizations_url":"https://api.github.com/users/cutright/orgs","repos_url":"https://api.github.com/users/cutright/repos","events_url":"https://api.github.com/users/cutright/events{/privacy}","received_events_url":"https://api.github.com/users/cutright/received_events","type":"User","site_admin":false},"labels":[{"id":91228996,"url":"https://api.github.com/repos/bokeh/bokeh/labels/type:%20discussion","name":"type: discussion","color":"2659A0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-08T20:27:26Z","updated_at":"2018-04-10T17:11:31Z","closed_at":null,"author_association":"NONE","body":"I've had significant lag in my Bokeh app since 0.12.11, and I've been opting out of updating my code.  This issue persists in 0.12.15.  I've done some investigation by installing individual commits.\r\n\r\nI'm using:\r\nMac OS 10.13.3\r\nChrome Version 64.0.3282.186 (Official Build) (64-bit)\r\n\r\n### Nov 15, 2017\r\nThe most recent commit with no lag issues for me: a14babf9faed8dcb6f93101630a49636629eaa19\r\nThe next commit causes significant lag when updating figures 3edfdaf0913b523def90ec1fcc84943cdb371a2e\r\n\r\nI found that simply reverting line 475 from:\r\n`@connect(@force_paint, () => @repaint())`\r\nback to\r\n`@connect(@force_paint, () => @paint())`\r\nResolves all of my issues\r\nhttps://github.com/bokeh/bokeh/blob/3edfdaf0913b523def90ec1fcc84943cdb371a2e/bokehjs/src/coffee/models/plots/plot_canvas.coffee#L475\r\n\r\n### Feb 8, 2018\r\nIf i follow the commits all the way up until right before the Selection class is introduced, I can resolve my lag issues in the same manner.\r\nIf I install commit 5a122daa46b0a8e378c5fa46f344b5ccb3f06498\r\nAnd change\r\n`this.connect(this.force_paint, () => this.repaint());`\r\nto\r\n`this.connect(this.force_paint, () => this.paint());`\r\nMy lag issue goes away\r\nhttps://github.com/bokeh/bokeh/blob/7aade50a04fcbcc99ec0a5ae1335c5ffadf6564d/bokehjs/src/coffee/models/plots/plot_canvas.ts#L589\r\n\r\n#### Comments\r\nThe introduction of the Selection class is causing additional lag issues for me, but I'm not yet sure if they can be resolved by updating my own code rather than Bokeh source code.  I will post a separate issue if I find out more.  But this is why I stopped checking at commit 5a122daa46b0a8e378c5fa46f344b5ccb3f06498\r\n\r\nThere is also something causing significant delays in the initial launch of the web view that I did not used to have, but I haven't tracked the issue down.  For sure though, repaint() to paint() as indicated above helps significantly.\r\n\r\n#### JavaScript console output\r\n[bug-fixed_GitHub_localhost-1523218296792.log](https://github.com/bokeh/bokeh/files/1887873/bug-fixed_GitHub_localhost-1523218296792.log)\r\n[bug_GitHub_localhost-1523218296792.log](https://github.com/bokeh/bokeh/files/1887874/bug_GitHub_localhost-1523218296792.log)\r\n\r\n#### Screenshots or screencasts of the bug in action\r\nhttps://www.dropbox.com/s/5ojvuldj7wal4k5/bug-fixed_GitHub_localhost-1523218296792.mov?dl=0\r\nhttps://www.dropbox.com/s/hlso65k322v10eh/bug_GitHub_localhost-1523218296792.mov?dl=0\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/380177672","html_url":"https://github.com/bokeh/bokeh/issues/7771#issuecomment-380177672","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/7771","id":380177672,"user":{"login":"bryevdv","id":1078448,"avatar_url":"https://avatars3.githubusercontent.com/u/1078448?v=4","gravatar_id":"","url":"https://api.github.com/users/bryevdv","html_url":"https://github.com/bryevdv","followers_url":"https://api.github.com/users/bryevdv/followers","following_url":"https://api.github.com/users/bryevdv/following{/other_user}","gists_url":"https://api.github.com/users/bryevdv/gists{/gist_id}","starred_url":"https://api.github.com/users/bryevdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryevdv/subscriptions","organizations_url":"https://api.github.com/users/bryevdv/orgs","repos_url":"https://api.github.com/users/bryevdv/repos","events_url":"https://api.github.com/users/bryevdv/events{/privacy}","received_events_url":"https://api.github.com/users/bryevdv/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T17:11:31Z","updated_at":"2018-04-10T17:11:31Z","author_association":"OWNER","body":"> There is a chance that there is a bug in the detection code, e.g. it may be to eager to recompute.\r\n\r\nThis seems like a good first avenue of investigation "}}
{"actor":{"display_login":"bryevdv"}}