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.

Updates to Notebook Cell output causes abrupt flashing/flickering in notebooks and interactive window

See original GitHub issue
  1. python -m pip install livelossplot
  2. Run this code https://github.com/microsoft/vscode-jupyter/blob/b4a3e1d13446c27b0bedf66272b08f5e13ace57f/src/test/datascience/liveloss.py
  3. Observe some jarring flashing behavior as the plot updates

recording (20)

The visual effect is exacerbated for interactive window because auto scrolling is done in VS Code core, but the issue is also present for notebooks (abrupt flashing as the plot disappears and gets recreated)

recording (21)

In classic Jupyter there’s no such flashing. The output updates are smooth:

recording (22)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

8reactions
dd-trafocommented, Mar 18, 2022

@rebornix Any progress on this issue? Progress bars like that of @DonJayamanne cause a strobe-like flickering due to constant redraws.

3reactions
rebornixcommented, Nov 3, 2021

Spent the whole afternoon digging into this and finally found the root cause: the flash is caused by overflow: hidden. Right now there is no primitive for “replace output” in the webview layer so we will always perform a remove and then add DOM operation. The remove will make the height of the container to be zero and since it has overflow: hidden, we are not going to see anything inside the output container. The next add enlarges the container and becomes visible. Somehow the browser doesn’t optimize for this case and always “flashes”.

The overflow: hidden was added to ensure that we see minimal overlap of outputs and code editors. Apparently it comes with a cost 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updates to Notebook Cell output causes abrupt flashing ...
Updates to Notebook Cell output causes abrupt flashing/flickering in notebooks and interactive window #132143.
Read more >
How to stop flickering while dragging the slider in interact ...
Ok. This helped me to avoid flickering. I used the following code for interactive output: demand = widgets.IntSlider(value = 10, min = 0, ......
Read more >
hp pavilion dv6 screen flickering
Hp Pavilion Dv6 Screen FlickeringSelect Troubleshoot > Advanced Options > Startup Settings Then Restart Now It then, after a bit, makes the "bing!"....
Read more >
How To Fix Flickering or Flashing Screen on Windows PC ...
This tutorial shows different ways to fix flickering or flashing screen on Windows PC.- Get genuine Windows keys at Prime Tech ...
Read more >
The Facts About Eye Floaters and Flashes - Vision Center
As your eyes get older, you may see odd floating images or flashing lights in your field of vision. Are these eye floaters...
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