-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/net/idna: adds 680KiB to binary when imported but unreferenced #38311
Labels
binary-size
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Comments
andybons
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Apr 10, 2020
bradfitz
added a commit
to tailscale/go
that referenced
this issue
Apr 14, 2020
…unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg
Also related: #38450 (lazy imports proposal) |
bradfitz
added a commit
to tailscale/go
that referenced
this issue
Jun 14, 2020
…unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg
bradfitz
added a commit
to tailscale/go
that referenced
this issue
Feb 18, 2021
…sable IDNA when unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg
josharian
added a commit
to tailscale/go
that referenced
this issue
Jul 29, 2021
…sable IDNA when unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg Change-Id: Ibdc119694181ae3f6af0c607b39e865dc2325548
josharian
added a commit
to tailscale/go
that referenced
this issue
Jul 30, 2021
…sable IDNA when unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg Change-Id: Ibdc119694181ae3f6af0c607b39e865dc2325548
josharian
added a commit
to tailscale/go
that referenced
this issue
Aug 5, 2021
…sable IDNA when unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg Change-Id: Ibdc119694181ae3f6af0c607b39e865dc2325548
josharian
added a commit
to tailscale/go
that referenced
this issue
Oct 26, 2021
…sable IDNA when unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg Change-Id: Ibdc119694181ae3f6af0c607b39e865dc2325548
josharian
added a commit
to tailscale/go
that referenced
this issue
Oct 26, 2021
…sable IDNA when unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg Change-Id: Ibdc119694181ae3f6af0c607b39e865dc2325548
josharian
added a commit
to tailscale/go
that referenced
this issue
Oct 26, 2021
…sable IDNA when unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg Change-Id: Ibdc119694181ae3f6af0c607b39e865dc2325548
josharian
added a commit
to tailscale/go
that referenced
this issue
Oct 27, 2021
…sable IDNA when unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg Change-Id: Ibdc119694181ae3f6af0c607b39e865dc2325548
josharian
added a commit
to tailscale/go
that referenced
this issue
Feb 7, 2022
…sable IDNA when unneeded Updates golang#38311 Saves 640 KiB with the version in the Go 1.14 release branch: dev:src $ ls -l idna.with* -rwxr-xr-x 1 bradfitz bradfitz 1925839 Apr 14 08:31 idna.with -rwxr-xr-x 1 bradfitz bradfitz 1269240 Apr 14 08:31 idna.without dev:src $ gosize idna.with 1208154 (79.02%) runtime 148673 ( 9.72%) type 62866 ( 4.11%) reflect 22329 ( 1.46%) unicode 18606 ( 1.22%) golang.org/x/text/unicode/bidi 12578 ( 0.82%) sync 8871 ( 0.58%) internal/reflectlite 8123 ( 0.53%) golang.org/x/net/idna 7446 ( 0.49%) syscall 6337 ( 0.41%) golang.org/x/text/unicode/norm 6312 ( 0.41%) internal/poll 4771 ( 0.31%) os 3415 ( 0.22%) internal/cpu 1878 ( 0.12%) strconv 1407 ( 0.09%) time 1065 ( 0.07%) io 881 ( 0.06%) fmt 764 ( 0.05%) runtime/internal/sys 650 ( 0.04%) sync/atomic 497 ( 0.03%) runtime/debug 475 ( 0.03%) golang.org/x/text/transform 461 ( 0.03%) internal/oserror 367 ( 0.02%) log 349 ( 0.02%) unicode/utf8 329 ( 0.02%) bytes 307 ( 0.02%) errors 277 ( 0.02%) golang.org/x/text/secure/bidirule 185 ( 0.01%) internal/syscall/unix 174 ( 0.01%) encoding/binary 163 ( 0.01%) main 77 ( 0.01%) internal/bytealg 59 ( 0.00%) runtime/internal/atomic 46 ( 0.00%) strings 40 ( 0.00%) math 14 ( 0.00%) internal/fmtsort 11 ( 0.00%) sort 11 ( 0.00%) internal/syscall/execenv dev:src $ gosize idna.without 886959 (88.54%) runtime 101185 (10.10%) type 8301 ( 0.83%) internal/reflectlite 3391 ( 0.34%) internal/cpu 496 ( 0.05%) runtime/debug 476 ( 0.05%) runtime/internal/sys 309 ( 0.03%) errors 204 ( 0.02%) sync 161 ( 0.02%) main 145 ( 0.01%) golang.org/x/net/idna 97 ( 0.01%) time 77 ( 0.01%) internal/bytealg Change-Id: Ibdc119694181ae3f6af0c607b39e865dc2325548
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
binary-size
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
I'm working on a Go program in a severely constrained environment and found that I can save 680 KiB of disk (and disk == RAM in this environment) by making sure x/net/idna is never imported (even if unused).
That is, the init tasks for x/net/idna and its deps don't layout in memory such that the linker can discard enough:
It adds 680KiB to binary compared to just the
println("hi")
line without the import.Linker says:
/cc @randall77 @mpvl @rsc @ianlancetaylor
The text was updated successfully, but these errors were encountered: