Skip to content

Unreasonably large storage space required for published solution with grpc.core reference #25598

@pavlexander

Description

@pavlexander

(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?

  1. Create a new project in VisualStudio in .Net. In my case I am using Blazor WASM with Asp.net core hosted option
  2. Add a nuget package reference to Google.Cloud.TextToSpeech.V1 and reference any part of the library in project. I used the var _client = new TextToSpeechClientBuilder { ChannelCredentials = googleCredential.ToChannelCredentials() }.Build();
  3. open csproj folder location (in my case - Server project)
  4. run dotnet publish MySolution.Server.csproj --configuration Release -r linux-x64 --mydestinationfolder
  5. 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)

image

without -r flag

image

looks like grpc assembly size on windows is "normal" - only 16 megs.. So the abnormality only affects linux distributions.

image

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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions