Update better-sqlite3 to v9.3.0 #10884
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Better-sqlite3 only provides pre-built binaries for Electron versions up to v22. This means that the module is built from source code during logseq builds, which on my machine adds about 45 seconds to the build (a 16-core 7950x3d building from a tmpfs, so likely much more time on CI runners or someone else's machine). Additionally about ~20-30MiB of unnecessary build artifacts from the better-sqlite3 build get included in the Electron package.
To solve both of these issues update to the latest v9.3.0 which provides pre-built binaries for most platforms (might actually be all platforms that Logseq supports, I only tested Linux x64) up through Electron v28. This also updates the used version of sqlite from v3.40.0 to v3.45.0. I looked through the release notes for all versions and didn't see anything that looked like a breaking change, only bugfixes, sqlite3 updates, and Electron pre-build support changes.
Also, FWIW it would be great if updating better-sqlite3 could be added to the workflow of updating Electron versions in order to prevent build times and distribution sizes from regressing again. I saw that there's intent to replace better-sqlite3 with a different sqlite driver for full-text searches but I assume that that is still a ways away.