-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Unreasonably large storage space required for published solution with grpc.core reference #25598
Description
(originally wrongly created a ticket in grpc/grpc-dotnet#1217)
What version of gRPC and what language are you using?
C# in .Net 5. I am using Google.Cloud.TextToSpeech.V1 v2.1.0, which depends on Grpc.Core 2.31 < 3
What operating system (Linux, Windows,...) and version?
- OS: Windows Pro Version 10.0.19042 Build 19042 (building on Windows for Linux)
What runtime / compiler are you using (e.g. .NET Core SDK version dotnet --info)
- .NET version:
.NET SDK (reflecting any global.json):
Version: 5.0.103
Commit: 72dec52dbd
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.103\
Host (useful for support):
Version: 5.0.3
Commit: c636bbdc8a
.NET SDKs installed:
5.0.103 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.WindowsDesktop.App 5.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
What did you do?
- Create a new project in
VisualStudioin.Net. In my case I am usingBlazor WASMwithAsp.net core hostedoption - Add a
nugetpackage reference toGoogle.Cloud.TextToSpeech.V1and reference any part of the library in project. I used thevar _client = new TextToSpeechClientBuilder { ChannelCredentials = googleCredential.ToChannelCredentials() }.Build(); - open csproj folder location (in my case - Server project)
- run
dotnet publish MySolution.Server.csproj --configuration Release -r linux-x64 --mydestinationfolder - check the folder size of
mydestinationfolder
What did you expect to see?
Expected: reasonable size
What did you see instead?
Actual: 255mb (143mb of which belong to grpc binaries)
without -r flag
looks like grpc assembly size on windows is "normal" - only 16 megs.. So the abnormality only affects linux distributions.
Anything else we should know about your project / environment?
Once you have referenced the Grpc.core package - the solution size becomes awfully big for linux users. (more than double the size of all of the rest of the solution). If you think that every bit of data of grpc binaries deserve all the storage space, fine, then I would like to suggest looking into the ways of slitting the nuget package into sub-packages, so you could also split the binaries proportionally.
Some people might me using 1% of the Grpc.core package, but still have to download all 140 megs of data that comes along with it.
Alternative option would be applying some compression/minimization methods (unless not applied already?). Is Linux in that much different that binaries weight 140mb as opposed to 16mb on win?


