From d77c7073b7b0b4c56c4ecfc7ec238958a0410188 Mon Sep 17 00:00:00 2001 From: Colin Ihrig Date: Sat, 11 Jan 2025 23:08:05 -0500 Subject: [PATCH] sqlite: disable memstatus APIs at build time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit defines SQLITE_DEFAULT_MEMSTATUS=0 for the SQLite build. This setting disables several currently unused C APIs in SQLite, which can yield noticeable performance improvements. This setting is also used by better-sqlite, and is one of the recommended compile-time options in the SQLite docs. The disabled APIs are used to report statistics about SQLite's memory usage. The drawback to this change is that those APIs could possibly be useful one day. Refs: https://sqlite.org/compile.html PR-URL: https://github.com/nodejs/node/pull/56541 Reviewed-By: Daeyeon Jeong Reviewed-By: Michaƫl Zasso Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli --- deps/sqlite/sqlite.gyp | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/sqlite/sqlite.gyp b/deps/sqlite/sqlite.gyp index 7a556018ca0f77..c2ba4da2259fa1 100644 --- a/deps/sqlite/sqlite.gyp +++ b/deps/sqlite/sqlite.gyp @@ -13,6 +13,7 @@ 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden }, 'defines': [ + 'SQLITE_DEFAULT_MEMSTATUS=0', 'SQLITE_ENABLE_MATH_FUNCTIONS', 'SQLITE_ENABLE_SESSION', 'SQLITE_ENABLE_PREUPDATE_HOOK'