sqlite: disable memstatus APIs at build time

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 <daeyeon.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
pull/56292/head
Colin Ihrig 2025-01-11 23:08:05 -05:00 committed by GitHub
parent 7409a1dcc4
commit c61504bda4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -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'