microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.38k stars 28.94k forks source link

Starting vscode from menu in Ubuntu is slow #45666

Closed Gruntfuggly closed 6 years ago

Gruntfuggly commented 6 years ago

I'm running Ubuntu 16.04.

If I start vscode from a bash terminal window with 'code', which is linked to /usr/bin/code, which is in turn linked to /usr/share/code/bin/code it starts and shows the editor in about 1 second.

If I start using the launcher icon, which is linked to /usr/share/code/code, it takes 8 seconds? This also generates the following terminal output:

Gtk-Message: Failed to load module "overlay-scrollbar"
[main 14:13:45] update#setState idle
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

This subsequently affects reloads too.

I've changed the launcher properties to point to the same binary as the command alias and it now starts in the same amount of time as the command line (as you would expect).

Whats the difference between these two binaries?

Tyriar commented 6 years ago

/usr/share/code/bin/code runs the CLI which launches /usr/share/code/code, it's a little weird that the CLI would be faster.

Could you try remove --unity-launch from the desktop file (`usr/share/applications/code.desktop)? It could be linked to that as that's a special argument passed in when using the launcher.

https://github.com/Microsoft/vscode/blob/c6b1114292288e76e2901e05e860faf3a08b4b5a/resources/linux/code.desktop#L5

vscodebot[bot] commented 6 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

Tyriar commented 5 years ago

Might be useful for people experiencing this problem https://github.com/Microsoft/vscode/issues/67247#issuecomment-458900004