AdguardTeam / AdguardTeam/AdGuardHome

Improve binary size

未关闭
#4,025 2 条评论 0 个 reaction 已指派 1 人 已被 @ainar-g 认领 在 GitHub 查看
infrastructure P3: Medium research
主要语言
TypeScript
星标
36.9k
派生
2.5k
PR 合并指标
30 天内没有已合并 PR

描述

### Discussed in https://github.com/AdguardTeam/AdGuardHome/discussions/4024

Originally posted by **jamesmacwhite** December 27, 2021
First of all, I just want to say AdGuard Home is great and it's really exciting to see all the constant development and features constantly being rolled out.

Once thing I've noticed is the binary size seems to be growing a fair bit. Comparing the last two latest stable releases 0.106.3 to 0.107.0 for ARMv7.

* 0.106.3 - 18.4 MB
* 0.107.0 - 32.1 MB

Roughly a 57% increase. Now for most contexts and platforms, this isn't really an issue. An increase of 13.7 MB in the context of today's world with data centres with literally petabytes of storage, it's nothing! However, for more embedded platforms such as routers which will have limited flash space, this is quite significant. There are of course ways to extend flash storage space with additional storage partitions and such, but it did make me think about the binary size itself.

With the great development cycle and constant releases and improvements is the binary size just going to continue to grow? I'm not really that familiar with Go so please forgive my ignorance. It is my understanding that because the binary is statically linked and includes the Go runtime, it will be much heavier, but it does raise the question whether at some point the binary size will make running on embedded products like routers very difficult.

Either way, just thought it was an interesting topic, thanks for anyone's contributions!

### Thoughts

The two main suspects are the packed front-end and module `github.com/google/gopacket`, which has some fairly large tables of some information. But perhaps there are others.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。