mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-02-20 03:40:03 -05:00
- While doing cross-compiling of Forgejo (with CGO enabled) it was noticed that besides compiling sqlite3, github.com/DataDog/zstd (a CGO wrapper around the reference zstd library) took a long time to compile. Upon investigating why this library was included in the first place I concluded that this library is not even used and compiling this package is a waste of time and CPU cycles.
- https://github.com/sassoftware/go-rpmutils is the library that uses the CGO zstd library, and would use it the pure Go variant (https://github.com/klauspost/compress/zstd) if CGO is enabled (which is the default). It uses zstd to uncompress the payload of a RPM packages. This is a operation that Forgejo does not use in the slightest, hence being unused code.
- It is not possible to force compiling the pure Go variant if CGO is enabled. Therefore forking and removing this code is the only option to avoid compiling the zstd C library. The changes made to the fork can be seen here:
|
||
|---|---|---|
| .. | ||
| alpine | ||
| alt | ||
| arch | ||
| cargo | ||
| cleanup | ||
| container | ||
| debian | ||
| rpm | ||
| auth.go | ||
| package_update.go | ||
| packages.go | ||