TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ever used `SQLite_OMIT_*` directives to reduce SQLite's memory footprint?

2 pointsby tester457almost 2 years ago
I recently came across a section in the book &quot;Using SQLite&quot; by Jay A. Kreibich where he mentions[1] the `SQLITE_OMIT_*` compile-time directives.<p>&gt; Using the default configuration, the compiled SQLite library is less than 700 KB on most platforms, and requires less than 4 MB of memory to operate. By omitting the more advanced features, the library can often be trimmed to 300 KB or less. With minor configuration changes, the library can be made to function on less than 256 KB of memory, making its total footprint not much more than half a megabyte<p>While this sounds promising, I&#x27;m struggling to find any discussions or blog posts on the use of these directives. Has anyone here tried them?<p>[1] https:&#x2F;&#x2F;www.oreilly.com&#x2F;library&#x2F;view&#x2F;using-sqlite&#x2F;9781449394592&#x2F;apas08.html

1 comment

JohnFenalmost 2 years ago
Yes, I&#x27;ve used them quite extensively. They work. There&#x27;s not really much that I found in terms of gotchas about them, as long as you are aware of whether or not you actually need something you&#x27;re wanting to omit. Sometimes you do when you don&#x27;t think you do.
评论 #37267553 未加载