From 56e2a1c4967353c1103e28643a5a34f885f14d67 Mon Sep 17 00:00:00 2001 From: ginuerzh Date: Sun, 31 May 2026 22:25:57 +0800 Subject: [PATCH] fix: disable UPX compression to resolve #863 startup regression UPX --best/--lzma/--brute adds ~3s startup time on low-spec systems (linux/arm) due to in-memory decompression on every invocation of gost -V. Disabled by default; opt in via GORELEASER_UPX=true for release builds that need it. --- .goreleaser.yaml | 63 +++--------------------------------------------- 1 file changed, 4 insertions(+), 59 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8d9fc96..883b139 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -40,65 +40,10 @@ builds: - "-s -w -X 'main.version={{ .Tag }}'" upx: - - # Whether to enable it or not. - # - # Templates: allowed. - enabled: true - - # Filter by build ID. - # ids: [build1, build2] - - # Filter by GOOS. - goos: [linux] - - # Filter by GOARCH. - goarch: [arm, arm64, amd64] - - # Filter by GOARM. - # goarm: [8] - - # Filter by GOAMD64. - # goamd64: [v1] - - # Compress argument. - # Valid options are from '1' (faster) to '9' (better), and 'best'. - compress: best - - # Whether to try LZMA (slower). - lzma: true - - # Whether to try all methods and filters (slow). - brute: true - - - # Whether to enable it or not. - # - # Templates: allowed. - enabled: true - - # Filter by build ID. - # ids: [build1, build2] - - # Filter by GOOS. - goos: [windows] - - # Filter by GOARCH. - goarch: [amd64] - - # Filter by GOARM. - # goarm: [8] - - # Filter by GOAMD64. - # goamd64: [v1] - - # Compress argument. - # Valid options are from '1' (faster) to '9' (better), and 'best'. - compress: best - - # Whether to try LZMA (slower). - lzma: true - - # Whether to try all methods and filters (slow). - brute: true + - # UPX compression. Disabled by default (see #863): upx --best/--lzma/--brute + # adds ~3s startup time on low-spec systems (linux/arm). Release builds can + # opt in via GORELEASER_UPX=true environment variable. + enabled: false archives: - format: tar.gz