Comments (10)
I test it on Linux and seems vendor packages cost 683 kb and standard library packages cost 2.23 mb.
from go-size-analyzer.
Maybe the rendered colours are a bit misleading, I would add different colours for different package types
from go-size-analyzer.
I thought the unknown sections size on the right hand side (coloured in light red) which is also like 2 MB was the standard lib. Is it not?
from go-size-analyzer.
Generally, unknown is meta information in the binary format itself, such as elf's section header and program header. but it's generally not that big, so if you can provide a sample of the binary file, I can do further analysis.
from go-size-analyzer.
@Zxilly Putting below all the information i can get including the binary file. Can you kindly re open this issue?
Zipped binary
Size Screenshot
![image](https://private-user-images.githubusercontent.com/763760/331484324-144b7f9d-352a-433c-84b6-8ee430616437.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMjYyNTIsIm5iZiI6MTcyNTIyNTk1MiwicGF0aCI6Ii83NjM3NjAvMzMxNDg0MzI0LTE0NGI3ZjlkLTM1MmEtNDMzYy04NGI2LThlZTQzMDYxNjQzNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwMVQyMTI1NTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yZGFkZTcyNjJlZjdlZjFjODkwYTkzNzFkYTdmY2VmM2M0ZTZhMDI2MGZjZmE2N2NkZjY4OTQ2YmUwMDQ0Njk3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.qfJK1EZ4r0B3RRF9r3fy4FQXk2M11FMpFwtXMAGpmmg)
gsa version
$ gsa --version
gsa
Version v1.0.6
Go Version go1.22.3
Platform darwin/arm64
Screenshot of startup Warning message
level=WARN msg="Warning: disassembler not supported for this architecture"
from go-size-analyzer.
It does look like there are some issues with macos support, but I think I'd have a hard time fixing it, I work on amd64 on Windows/Linux and support for other architectures and systems is basically based on documentation rather than real experience.
I test the binary from the https://github.com/kishaningithub/tf-import-gen/releases/download/v0.8.0/tf-import-gen_0.8.0_linux_amd64.tar.gz and results looks better.
As you can see from the figure, the binary size can be reduced by about 6m after stripping the symbol and debug information.
from go-size-analyzer.
Will check the Linux version today.. Was curious to see how much size can be reduced without removing the debug and symbol table info
from go-size-analyzer.
Also I can definitely help out on testing and improving this tool for Mac os
from go-size-analyzer.
After removing the symbol table and debug information the compressed size went from ~3MB to ~1MB :-) screenshot and link below
https://github.com/kishaningithub/tf-import-gen/releases
Screenshot
![image](https://private-user-images.githubusercontent.com/763760/333850034-e5e37f86-8006-42ac-81bf-e42228dca1b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMjYyNTIsIm5iZiI6MTcyNTIyNTk1MiwicGF0aCI6Ii83NjM3NjAvMzMzODUwMDM0LWU1ZTM3Zjg2LTgwMDYtNDJhYy04MWJmLWU0MjIyOGRjYTFiOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwMVQyMTI1NTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iYjljMmNiNDhhYTM3YTI5OWFlNmQ1OTBkMzY0YTAyNDVlN2YyMmIyZTc3ODMwYzEyOTMwNjgwYWIyMjFmMjRhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Kqcn3mxB3dbLltGCx6akSLOt37Ve78y_m59K1oec5Ws)
from go-size-analyzer.
After the removal of debug information the size reported looks correct in macos x (screenshot below)
![image](https://private-user-images.githubusercontent.com/763760/334652347-b6fa6dc2-f8f7-428b-a9a7-dd66319aa6e2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMjYyNTIsIm5iZiI6MTcyNTIyNTk1MiwicGF0aCI6Ii83NjM3NjAvMzM0NjUyMzQ3LWI2ZmE2ZGMyLWY4ZjctNDI4Yi1hOWE3LWRkNjYzMTlhYTZlMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwMVQyMTI1NTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xYzBiZGYwMzM5NmZjZjAwNGZkNzU5Y2E1MGUzYzEzODI5NjQzNWU2ZjlhZWU0ZjEyMjQ5YjIzOGEzMjFhM2NhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.88MzVOR6LUyNysCwFz9kEOUTgAEF9Id-1mGciEnjkHU)
Closing this issue for now
from go-size-analyzer.
Related Issues (20)
- golangci-lint: address remaining issue reported HOT 1
- Analyse .rodata/go:embed content HOT 5
- Failure to analyze when the symbol table is disabled on darwin/arm64/go (1.22,1.23)/cgo HOT 7
- Fix code scanning alert - Incomplete URL substring sanitization
- Open PR on go-recipes HOT 1
- Fix code scanning alert - Insecure temporary file
- DWARF: should read filename from linereader, but not `compdir + compileUnit name`
- go-size-analyzer 1.3.0 regression test failure HOT 4
- test: Coverage report for wasm is not correct
- panic: interface conversion: interface {} is nil, not string HOT 7
- Support analyse const values (dwarf.QualType) HOT 2
- missing newline in default mode output
- Implementing a reproducible diff interface HOT 3
- Suggestion for dependabot HOT 3
- The wasm module panic while processing large file HOT 3
- 1.5.2 release build failure HOT 3
- Render Treemap with Canvas HOT 1
- move DWARF sections out of unknown sections HOT 1
- webui: Improve display of packages paths ending with version HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-size-analyzer.