SQLite Forum

Need help building a custom amalgamation
Login
> I want the size of the binary to be small to ensure a fast upload, so I guess I'm mostly concerned about object size?

Don't worry so much about the size of `sqlite3.c`. As a point of comparison, the Fossil SCM project makes heavy use of sqlite and imports the latest `sqlite3.c` on a regular basis. The 64-bit binary for fossil is, as of this moment, right at 4.3MB, including all of fossil's (not inconsiderable) code and its own copy of sqlite.

```
[stephan@st3v3:~/fossil/fossil]$ size fossil
   text	   data	    bss	    dec	    hex	filename
4212051	  82704	  18136	4312891	 41cf3b	fossil
[stephan@st3v3:~/fossil/fossil]$ size bld/sqlite3.o 
   text	   data	    bss	    dec	    hex	filename
1035169	  18056	   1272	1054497	 101721	bld/sqlite3.o
```

i have another project which uses its own copy of sqlite and its "size" is only 1.3MB (built with many of sqlite3's extra features *enabled*), considerably smaller than the 8MB `sqlite3.c`.

If your embedded environment only has 512kb of memory you will run into problems, but if it's got a "reasonably modern" amount of memory (at least a few tens of MB of RAM and a few spare MB of long-term storage), you'll almost certainly have no resource-related problems which lead back to sqlite.