question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

repaint() in plot_canvas.coffee causing significant lag

See original GitHub issue

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.

I’m using: Mac OS 10.13.3 Chrome Version 64.0.3282.186 (Official Build) (64-bit)

Nov 15, 2017

The most recent commit with no lag issues for me: a14babf9faed8dcb6f93101630a49636629eaa19 The next commit causes significant lag when updating figures 3edfdaf0913b523def90ec1fcc84943cdb371a2e

I found that simply reverting line 475 from: @connect(@force_paint, () => @repaint()) back to @connect(@force_paint, () => @paint()) Resolves all of my issues https://github.com/bokeh/bokeh/blob/3edfdaf0913b523def90ec1fcc84943cdb371a2e/bokehjs/src/coffee/models/plots/plot_canvas.coffee#L475

Feb 8, 2018

If 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. If I install commit 5a122daa46b0a8e378c5fa46f344b5ccb3f06498 And change this.connect(this.force_paint, () => this.repaint()); to this.connect(this.force_paint, () => this.paint()); My lag issue goes away https://github.com/bokeh/bokeh/blob/7aade50a04fcbcc99ec0a5ae1335c5ffadf6564d/bokehjs/src/coffee/models/plots/plot_canvas.ts#L589

Comments

The 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

There 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.

JavaScript console output

bug-fixed_GitHub_localhost-1523218296792.log bug_GitHub_localhost-1523218296792.log

Screenshots or screencasts of the bug in action

https://www.dropbox.com/s/5ojvuldj7wal4k5/bug-fixed_GitHub_localhost-1523218296792.mov?dl=0 https://www.dropbox.com/s/hlso65k322v10eh/bug_GitHub_localhost-1523218296792.mov?dl=0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
bryevdvcommented, Jan 31, 2019

As far as I can confirm, both examples here work well now with #8085

1reaction
bryevdvcommented, May 18, 2018

Yes, when we are able to look into it, there will be updates here or in a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java 2D game "powered" by repaint(); lags in a strange way
The solution is to use a JPanel, which is much faster, and to put that into your JFrame as to not have any...
Read more >
Low-latency painting in AWT and Swing - Pavel Fatin
In this article I enumerate reasons why typical approach to painting in AWT / Swing can result in substantial visual lags, provide examples ......
Read more >
bokeh Changelog - pyup.io
7771 [layout] Repaint() in plot_canvas.coffee causing significant lag - 7805 [component: bokehjs] [layout] Bokeh spacer sets height to one pixel with ...
Read more >
Bokeh/CHANGELOG at master · digitalsatori/Bokeh - GitHub
#7771 [layout] Repaint() in plot_canvas.coffee causing significant lag. - #7805 [component: bokehjs] [layout] Bokeh spacer sets height to one pixel with ...
Read more >
qandamaster370.xml - Chegg
https://www.chegg.com/homework-help/questions-and-answers/scores-10-golfers-702-764-738-749-726-74-727-707-744-708-calculate-standard-deviation-data- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found