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.

WebGL is slow in snap package

See original GitHub issue
  • VS Code Version: 1.55.1, 1.56.0-insider
  • OS Version: Ubuntu 20.10

I often need to print a table (or data frame) in R in the integrated terminal via remote ssh like the following. In previous versions, the printing is almost as fast as in the native console.

image

In the recent release, the terminal becomes quite laggy to print such table via remote ssh in the integrated terminal. It looks like the printing is sent line by line. If I print the table in a tmux window, it becomes much worse, i.e. printing such a table which previously took less than 0.5s now takes more than 20s while in the middle the remote ssh connection becomes unstable sometimes.

To narrow down the problem, I tried the following:

  1. Locally, printing the table in and out of tmux is very fast.
  2. In a local vscode, open the integrated terminal and ssh to the server, start R, and print mtcars. It is very fast too but sometimes it becomes slow in tmux.
  3. Use remote ssh to connect to the server. Open the integrated terminal and start R and print mtcars. It is fast. But in tmux to do the same, it is very laggy, i.e. the printing is almost done line by line.

To reproduce my steps, run

sudo apt install r-base
tmux
Rscript -e 'print(mtcars)'

However, put the output into a text file and cat the file, it is not laggy.

Rscript -e 'print(mtcars)' > mtcars.txt
cat mtcars.txt

The typing in the integrated terminal is laggy too. In current release (1.55.1), I need to switch to "terminal.integrated.rendererType": "canvas" so that typing is no longer laggy. In current insider, the setting is gone, and I have to use "terminal.integrated.gpuAcceleration": "off" and the laggy typing is fixed. However, in both cases, while the laggy typing is fixed, the laggy printing via remote ssh still persists.

Does this issue occur when all extensions are disabled?: Yes

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Tyriarcommented, May 7, 2021

It seems the WebGL renderer is slow under Electron 12 only in the snap package. Workarounds:

  • Use the deb/rpm package
  • Set "terminal.integrated.gpuAcceleration": "off"
0reactions
madalinigniscacommented, Nov 19, 2021

snap connections firefox will show that it is connected to opengl same snap connections chromium will show it is connected to opengl

snap connections code has no connection (means it is not allowed to any outside thing).

Publishing a snap with --classic does not means it will allow the snap to bypass all security measures.

Code snap needs some extra connections so would benefit for many extras as expected.

The chromium snap might give a hint (everything is automated when installing it).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox - fixing stuttering/slow WebGL and video playback
First, tick the "recommended performance settings" setting, then try if it worked for you. If it did not, then you can try to...
Read more >
Electron app can't get a webgl context on Debian - snapd
I don't run Debian myself, but I've received some bug reports that Polarr (an electron snap) doesn't work on Debian.
Read more >
113009 - Long WebGL shader compile/link time - chromium
A complex WebGL fragment shader takes ~5,300 ms to link in WebGL ... Sometimes I get failure at getProgramParameter, and sometimes I get...
Read more >
WebGL painfully slow on Ubuntu 20.04 LTS
As a driver I use the proprietary nvidia-driver-450 package. Running glxinfo|egrep "OpenGL vendor|OpenGL renderer" returns my GTX960M as the ...
Read more >
1739259 - Snap, X11/dual GPU NV+Intel: Intel-only=ok (EGL ...
Summary: Firefox 94 slow WebGL on Intel Mesa (ubuntu linux) → Snap: ... (IMHO: Systemd and Gnome are not a snap packages, neither...
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