S
S
Seedor2019-12-02 17:10:40
go
Seedor, 2019-12-02 17:10:40

Why is the size of the compiled file built with the https://github.com/mattn/go-sqlite3 package so large?

If usually the file is 3-6mb in size, then with the go-sqlite3 package 16-17mb. Moreover, the sqlite3 library itself for other languages ​​is very compact.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav, 2019-12-02
@Seedor

Golang, this is not about the small size of the binary.
Most of my programs weigh 15-20mb without the use of CGO and bindings, and this does not depend much on the size of the code and functionality, everything is native, just for example, the http library greatly increases the size of the binary.
If you are concerned about the size, then there is an output https://blog.filippo.io/shrink-your-go-binaries-wi...
I managed to compress 20mb to 4mb, but I don’t use it myself, because debugging is important to me and getting a dump of a running process in the prod.

A
Andrey Shatokhin, 2019-12-02
@Sovigod

Because it's golang ))
And in more detail - the lib was never rewritten in go (then it could be fast and compact. The compiler would be able to take only what is needed into the binary) Now there are just bindings that include the usual lib.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question