You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #2304 we've tried to trace what happened to build flags that helped to reduce binary size. The information in the thread appeared quite valuable to me, and I thought that urfave/cli is popular enough among Go beginners to share a tutorial on where the binary size comes from, and how to prove and optimize it (if possible).
I am not sure I am capable to write it myself in a concise and visually pleasing way with dumps, pictures and commands. So I leave this issue here to challenge other Go hackers.
#2366 solves 80% of the issue. The rest is using https://github.com/Zxilly/go-size-analyzer to see where bloat comes from. Then explain some techniques like syncing go.mod files to have the same dependency versions for different modules. Maybe something else, like why and how introspection bloats, how to remove it. Also how to remove templates that trigger introspection.
@abitrolly Hi! I'd like to work on this issue.
I've started looking into the remaining parts from #2366, especially using go-size-analyzer to investigate binary size, and understanding the impact of dependency versions, reflection/introspection, and templates.
Activity
abitrolly commentedon Jun 17, 2026
#2366 solves 80% of the issue. The rest is using https://github.com/Zxilly/go-size-analyzer to see where bloat comes from. Then explain some techniques like syncing
go.modfiles to have the same dependency versions for different modules. Maybe something else, like why and how introspection bloats, how to remove it. Also how to remove templates that trigger introspection.imsumedhaa commentedon Sep 12, 2026
@abitrolly Hi! I'd like to work on this issue.
I've started looking into the remaining parts from #2366, especially using go-size-analyzer to investigate binary size, and understanding the impact of dependency versions, reflection/introspection, and templates.
kolyshkin commentedon Sep 24, 2026
Related: #2441 / #2442