Re: [sqlite] Minimize sqlite3.o size
On Tue, Jul 12, 2011 at 10:48 AM, Baruch Burstein wrote: > These do not work with the amalgamation. How do I use these? > Some will, some won't. To use those that won't, you'll need to rebuild the SQLite amalgamation with the options you want to use and import that new amalagmation into the Fossil source tree. > > On Tue, Jul 12, 2011 at 5:44 PM, Richard Hipp wrote: > > > Here are some additional options you might try to minimize the SQLite > size > > in Fossil: > > > > SQLITE_OMIT_ANALYZE > > SQLITE_OMIT_AUTOMATIC_INDEX > > SQLITE_OMIT_AUTOVACUUM > > SQLITE_OMIT_BUILTIN_TEST > > SQLITE_OMIT_DEPRECATED > > SQLITE_OMIT_GET_TABLE > > SQLITE_OMIT_INCRBLOB > > SQLITE_OMIT_SHARED_CACHE > > SQLITE_OMIT_UTF16 > > SQLITE_OMIT_VIRTUALTABLE > > > > No guarantees that Fossil will run, or even compile, with the above. But > > if > > you experiment you can probably find a subset of the above that will work > > for you. > > > > > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Minimize sqlite3.o size
Add #include or #include "SomeHeader.h" to the top of the amalgamation, then define them in SomeHeader.h? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Baruch Burstein Sent: Tuesday, July 12, 2011 10:48 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Minimize sqlite3.o size These do not work with the amalgamation. How do I use these? On Tue, Jul 12, 2011 at 5:44 PM, Richard Hipp wrote: > Here are some additional options you might try to minimize the SQLite > size in Fossil: > > SQLITE_OMIT_ANALYZE > SQLITE_OMIT_AUTOMATIC_INDEX > SQLITE_OMIT_AUTOVACUUM > SQLITE_OMIT_BUILTIN_TEST > SQLITE_OMIT_DEPRECATED > SQLITE_OMIT_GET_TABLE > SQLITE_OMIT_INCRBLOB > SQLITE_OMIT_SHARED_CACHE > SQLITE_OMIT_UTF16 > SQLITE_OMIT_VIRTUALTABLE > > No guarantees that Fossil will run, or even compile, with the above. > But if you experiment you can probably find a subset of the above that > will work for you. > > > > On Tue, Jul 12, 2011 at 9:36 AM, Baruch Burstein >wrote: > > > Yes I know (although I only got a 200k difference), but -O3 is about > twice > > as fast in my tests. > > > > > > On Tue, Jul 12, 2011 at 4:22 PM, Stephan Beal > > > > wrote: > > > > > On Tue, Jul 12, 2011 at 3:10 PM, Baruch Burstein > > > > > >wrote: > > > > > > > I assume this is the same for sqlite3.dll or sqlite3.lib, but if > > > > not, > I > > > am > > > > interested in sqlite3.o (mingw32). > > > > How can I minimize the size of the library (compiling with -O3, > > > > since > > > speed > > > > is my top concern, so different optimizations is not an option)? > > > > If I > > > know > > > > > > > > > > Coincidentally, i just tried -O3 and the end result was almost > > > 0.5MB > > larger > > > than with -g -Os. > > > > > > -- > > > - stephan beal > > > http://wanderinghorse.net/home/stephan/ > > > ___ > > > sqlite-users mailing list > > > sqlite-users@sqlite.org > > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > ___ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > -- > D. Richard Hipp > d...@sqlite.org > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Minimize sqlite3.o size
These do not work with the amalgamation. How do I use these? On Tue, Jul 12, 2011 at 5:44 PM, Richard Hipp wrote: > Here are some additional options you might try to minimize the SQLite size > in Fossil: > > SQLITE_OMIT_ANALYZE > SQLITE_OMIT_AUTOMATIC_INDEX > SQLITE_OMIT_AUTOVACUUM > SQLITE_OMIT_BUILTIN_TEST > SQLITE_OMIT_DEPRECATED > SQLITE_OMIT_GET_TABLE > SQLITE_OMIT_INCRBLOB > SQLITE_OMIT_SHARED_CACHE > SQLITE_OMIT_UTF16 > SQLITE_OMIT_VIRTUALTABLE > > No guarantees that Fossil will run, or even compile, with the above. But > if > you experiment you can probably find a subset of the above that will work > for you. > > > > On Tue, Jul 12, 2011 at 9:36 AM, Baruch Burstein >wrote: > > > Yes I know (although I only got a 200k difference), but -O3 is about > twice > > as fast in my tests. > > > > > > On Tue, Jul 12, 2011 at 4:22 PM, Stephan Beal > > wrote: > > > > > On Tue, Jul 12, 2011 at 3:10 PM, Baruch Burstein > > >wrote: > > > > > > > I assume this is the same for sqlite3.dll or sqlite3.lib, but if not, > I > > > am > > > > interested in sqlite3.o (mingw32). > > > > How can I minimize the size of the library (compiling with -O3, since > > > speed > > > > is my top concern, so different optimizations is not an option)? If I > > > know > > > > > > > > > > Coincidentally, i just tried -O3 and the end result was almost 0.5MB > > larger > > > than with -g -Os. > > > > > > -- > > > - stephan beal > > > http://wanderinghorse.net/home/stephan/ > > > ___ > > > sqlite-users mailing list > > > sqlite-users@sqlite.org > > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > ___ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > > > > -- > D. Richard Hipp > d...@sqlite.org > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Minimize sqlite3.o size
Here are some additional options you might try to minimize the SQLite size in Fossil: SQLITE_OMIT_ANALYZE SQLITE_OMIT_AUTOMATIC_INDEX SQLITE_OMIT_AUTOVACUUM SQLITE_OMIT_BUILTIN_TEST SQLITE_OMIT_DEPRECATED SQLITE_OMIT_GET_TABLE SQLITE_OMIT_INCRBLOB SQLITE_OMIT_SHARED_CACHE SQLITE_OMIT_UTF16 SQLITE_OMIT_VIRTUALTABLE No guarantees that Fossil will run, or even compile, with the above. But if you experiment you can probably find a subset of the above that will work for you. On Tue, Jul 12, 2011 at 9:36 AM, Baruch Burstein wrote: > Yes I know (although I only got a 200k difference), but -O3 is about twice > as fast in my tests. > > > On Tue, Jul 12, 2011 at 4:22 PM, Stephan Beal > wrote: > > > On Tue, Jul 12, 2011 at 3:10 PM, Baruch Burstein > >wrote: > > > > > I assume this is the same for sqlite3.dll or sqlite3.lib, but if not, I > > am > > > interested in sqlite3.o (mingw32). > > > How can I minimize the size of the library (compiling with -O3, since > > speed > > > is my top concern, so different optimizations is not an option)? If I > > know > > > > > > > Coincidentally, i just tried -O3 and the end result was almost 0.5MB > larger > > than with -g -Os. > > > > -- > > - stephan beal > > http://wanderinghorse.net/home/stephan/ > > ___ > > sqlite-users mailing list > > sqlite-users@sqlite.org > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Minimize sqlite3.o size
Yes I know (although I only got a 200k difference), but -O3 is about twice as fast in my tests. On Tue, Jul 12, 2011 at 4:22 PM, Stephan Beal wrote: > On Tue, Jul 12, 2011 at 3:10 PM, Baruch Burstein >wrote: > > > I assume this is the same for sqlite3.dll or sqlite3.lib, but if not, I > am > > interested in sqlite3.o (mingw32). > > How can I minimize the size of the library (compiling with -O3, since > speed > > is my top concern, so different optimizations is not an option)? If I > know > > > > Coincidentally, i just tried -O3 and the end result was almost 0.5MB larger > than with -g -Os. > > -- > - stephan beal > http://wanderinghorse.net/home/stephan/ > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Minimize sqlite3.o size
On Tue, Jul 12, 2011 at 3:10 PM, Baruch Burstein wrote: > I assume this is the same for sqlite3.dll or sqlite3.lib, but if not, I am > interested in sqlite3.o (mingw32). > How can I minimize the size of the library (compiling with -O3, since speed > is my top concern, so different optimizations is not an option)? If I know > Coincidentally, i just tried -O3 and the end result was almost 0.5MB larger than with -g -Os. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Minimize sqlite3.o size
http://www.sqlite.org/compile.html Read section 1.4 -- tells you all you need to know. First thing you should do is see if there's any significant performance difference with -Os instead of -O3. You may be surprised. Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Baruch Burstein [bmburst...@gmail.com] Sent: Tuesday, July 12, 2011 8:10 AM To: sqlite-users@sqlite.org Subject: EXT :[sqlite] Minimize sqlite3.o size I assume this is the same for sqlite3.dll or sqlite3.lib, but if not, I am interested in sqlite3.o (mingw32). How can I minimize the size of the library (compiling with -O3, since speed is my top concern, so different optimizations is not an option)? If I know there are parts of SQL I don't need in my program (like JOIN or ATTACH or triggers), can I remove support for them (this is for an embedded system and every byte counts, or at least every 100 bytes or so)? What pre-processor options can I set to remove things like FTS or R-Tree support which I do not need? Are there any other things easily removable that I might not need and might not even know they exist in order to remove them? How about some of the c API? Most of it I never use. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Minimize sqlite3.o size
http://www.sqlite.org/compile.html#omitfeatures Make sure you read all important notes and tested your app thoroughly. Pavel On Tue, Jul 12, 2011 at 9:10 AM, Baruch Burstein wrote: > I assume this is the same for sqlite3.dll or sqlite3.lib, but if not, I am > interested in sqlite3.o (mingw32). > How can I minimize the size of the library (compiling with -O3, since speed > is my top concern, so different optimizations is not an option)? If I know > there are parts of SQL I don't need in my program (like JOIN or ATTACH or > triggers), can I remove support for them (this is for an embedded system and > every byte counts, or at least every 100 bytes or so)? What pre-processor > options can I set to remove things like FTS or R-Tree support which I do not > need? Are there any other things easily removable that I might not need and > might not even know they exist in order to remove them? How about some of > the c API? Most of it I never use. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Minimize sqlite3.o size
I assume this is the same for sqlite3.dll or sqlite3.lib, but if not, I am interested in sqlite3.o (mingw32). How can I minimize the size of the library (compiling with -O3, since speed is my top concern, so different optimizations is not an option)? If I know there are parts of SQL I don't need in my program (like JOIN or ATTACH or triggers), can I remove support for them (this is for an embedded system and every byte counts, or at least every 100 bytes or so)? What pre-processor options can I set to remove things like FTS or R-Tree support which I do not need? Are there any other things easily removable that I might not need and might not even know they exist in order to remove them? How about some of the c API? Most of it I never use. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users