bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
22.76k stars 3.99k forks source link

Bazel binary size increase #22722

Open meisterT opened 1 month ago

meisterT commented 1 month ago

Description of the bug:

Background: We had a project to reduce bazel binary size a couple years ago (https://docs.google.com/document/d/1Igmv-2GfXkoVFWTXvBYPeniQom8nLAwzqzridDlBIS4/edit#heading=h.lk6ehhcngo7) which ended up ~42MB with Bazel 2.1.0.

Now, I realized that Bazel 7.2.0 is almost 70MB large.

I did some investigation and found the following changes that increased the binary size by more than 0.5MB:

(As we didn't have a Bazel binary at every commit, the actual culprit might be a culprit of the identified commit.)

Most of these seem to be 3rd party deps upgrades, we might want to see which deps are easy to cut or have unnecessary files in them.

meisterT commented 1 month ago

"Full" data: https://docs.google.com/spreadsheets/d/1YAhoCwECqSUeZgsf_pSwuprQscAJ5rzL1DGcba8iIK0/edit?usp=sharing

One question is how much people care about Bazel binary size today.

fmeum commented 1 month ago

A quick win could be to replace fastutil with fastutil-core if possible. @justinhorvitz