Search code examples
visual-studio-codefilesize

Is it possible to find out the size of the Visual Studio Code extension?


I sometimes go to places with very bad Internet, and when I download a large package, all the other programs on the computer start to work poorly...

So, is there any way to show extension size?


Solution

  • I've looked and asked about this as well, and I believe the answer to your question yes and no. When you download an extension via the VSCode Market Place you get the opportunity — like with any other download from the browser — to look at the KB, or MB, that you will be downloading, however; Microsoft uses a special Visual Studio packaging for VS-Code, and Visual Studio(IDE) extensions — its called VSIX. When an author of an extension publishes their extension to the market place, they publish their extensions VSIX file, which in technical terms is a compacted representation of the data that makes up the extension, therefore, you are not actually seeing the true size of the extension.

    Not all is lost though. The true size of the extension can be seen in your operating systems $HOME/.vscode/extensions directory (I use Linux so the directory for windows is probably in the same place, relativity speaking, the pathname probably just looks different and has a 'C:' and back-slashes instead of fwd-slashes).



    My Suggestion


    When you are in a place where you have a good internet connection, download all of the extensions you use as VSIX files, straight from the market place. Then when you use VSCode in a place where you have a bad internet connection, you can uninstall all of your extensions manually by deleting them from your $HOME/.vscode/extensions directory, and then reinstall them 1 by 1 so you can see the individual impact that the extensions are having on your machine, and internet connection your using.

    One last tip. Don't use themes or extensions that use Language Servers, as they will constantly communicate with a server, which is not good if your internet connection is in the Kilobytes.

    If you travel somewhere where your internet connection is not great.