dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 671 forks source link

Linux version of the debugger is larger than macOS version #1654

Open gregg-miskelly opened 7 years ago

gregg-miskelly commented 7 years ago

Environment data

C# Extension version: 1.12.0-beta3

The Linux version of the debugger package is > 2x the size of the OSX package. 63277583 coreclr-debug-linux-x64.zip 26583206 coreclr-debug-osx.10.11-x64.zip

There are four reasons I see for this:

  1. There is a bug in the OSX package - it looks like we aren't using NI images on OSX.
  2. The Linux package seems to have both .ni and regular dlls
  3. The vsdbg native libraries are all much larger their their OSX counter parts
  4. The CoreCLR native libraries are a little bigger than their OSX counter parts

Here is the difference in size for various native files libvsdbg.so 1,5648,513 libvsdebugeng.impl.so 1,164,1020 libvsdebugeng.so 1,150,6621 libcoreclr.so 1,881,138 libvsbaseservices.so 1,657,427 libmscordaccore.so 523,206 libmscordbi.so 415,900 libclrjit.so 173,278 libdbgshim.so 147,334 System.Security.Cryptography.Native.OpenSsl.so 121,480 System.Security.Cryptography.OpenSsl.dll 88,064 vsdbg 64691 vsdbg-ui 63031

gregg-miskelly commented 7 years ago

One think we might want to try is to switch to llvm-link, and possibly enable Link-Time-Optimizations (LTO) -- https://stackoverflow.com/questions/35922966/lto-with-llvm-and-cmake.

CoreCLR seems to use llvm-link already: coreclr\src\pal\tools\gen-buildsys-clang.sh(172): "-DCMAKE_LINKER=$llvm_link" \

gregg-miskelly commented 7 years ago

1 and 2 are now fixed, so the packages are much closer now. Leave this open to track 3.