[23.x] Revert “build: Use Homebrew’s sqlite package if it is available” #26333
pull fanquake wants to merge 2 commits into bitcoin:23.x from fanquake:revert_slow_macos_sqlite_23_x changing 2 files +3 −11-
fanquake commented at 1:37 pm on October 18, 2022: memberBackport of #25985 to the 23.x branch.
-
Revert "build: Use Homebrew's sqlite package if it is available"
This reverts ee7b84e63cbeadd5e680d69ff0548275581e9241 from #20527. This change was made without any rationale, maybe other than a brew installed version might be newer, and that's "better". However when building from source on macOS, it just results in drastically worse perofrmance, and results in issues / confusions like #25724. Resolves the "build from source" portion of #25724. Building from depends is still not ideal, however I have some other changes that might help improve things in that case. The difference in performance can be observed using the example from https://github.com/bitcoin/bitcoin/issues/25724#issuecomment-1213554922, but minified to only 10 descriptors. i.e: ```bash time src/bitcoin-cli createwallet speedy true time src/bitcoin-cli importdescriptors '[ {"desc":"raw(00145846369f3d6ba366d6f5a903fb5cf4dca3763c0e)#k9wh6v62","timestamp":"now"}, {"desc":"raw(001420800aabf13f3a4c4ce3ce4c66cecf1d17f21a6e)#6m0hlfh4","timestamp":"now"}, {"desc":"raw(0014c6bf9715e06d73ebf9b3b02d5cc48d24d8bbabc1)#wyavh36r","timestamp":"now"}, {"desc":"raw(00141ba7807b3f46af113beaea5c698428ce7138cd8a)#jctdsups","timestamp":"now"}, {"desc":"raw(00140c1bd27f10fff01b36ddf3c1febaa1acff19b080)#9s6nc3pk","timestamp":"now"}, {"desc":"raw(00141226e31987e4bc2e63c0ee12908f675e40464b20)#9pp7qm39","timestamp":"now"}, {"desc":"raw(0014f73f149f7503960a5e849c6ee7a8a8c336f631cb)#qtkxv9fc","timestamp":"now"}, {"desc":"raw(0014c8ccb4d81ffc769fc5fdd8d7eed69b0e0cae5749)#hn39qayv","timestamp":"now"}, {"desc":"raw(001498565aead2d67a22a6021d55210f2a917fc22169)#6ar3vwsx","timestamp":"now"}, {"desc":"raw(001403013248ac0cd9eabe176cad162cda2a19f771e1)#4m47mukd","timestamp":"now"} ]' ``` Running master, when building from souce and using brew installed sqlite, this takes ~3.4s. With this PR, the same operation takes ~0.3s. Github-Pull: #25985 Rebased-From: d216d714aae36e6f1c95f82aef81a0be74dee2f3
-
fanquake added the label Build system on Oct 18, 2022
-
fanquake added the label Backport on Oct 18, 2022
-
dergoegge commented at 10:37 am on October 21, 2022: memberACK 419bdc534f885de4574e054cfcac6869f7a4e185
-
stickies-v approved
-
stickies-v commented at 11:17 am on October 21, 2022: contributor
ACK https://github.com/bitcoin/bitcoin/commit/419bdc534f885de4574e054cfcac6869f7a4e185
I verified that the change matches #25985. I also verified that, on macOS with sqlite3 installed with brew,
23.x
uses the homebrew version and with this PR it uses the system version.When running the below command:
0./autogen.sh 1./configure --enable-suppress-external-warnings --disable-bench --disable-tests --with-gui=no 2cat config.status | grep "sqlite"
On this PR, it outputs:
0S["SQLITE_LIBS"]="-lsqlite3"
On 23.x, it outputs:
0S["SQLITE_LIBS"]="-L/opt/homebrew/Cellar/sqlite/3.39.4/lib -lsqlite3" 1S["SQLITE_CFLAGS"]="-I/opt/homebrew/Cellar/sqlite/3.39.4/include" 2S["PKG_CONFIG_PATH"]="/opt/homebrew/opt/qt@5/lib/pkgconfig:/opt/homebrew/opt/sqlite/lib/pkgconfig:"
-
stickies-v commented at 11:42 am on October 21, 2022: contributorAfter reviewing #26350, I’m not sure why this backport doesn’t do the same docs update? Seems to be like they should be the same?
-
maflcko removed the label Build system on Oct 21, 2022
-
maflcko added this to the milestone 22.1 on Oct 21, 2022
-
hebasto commented at 1:05 pm on October 21, 2022: member
Did you mean “23.1”?
-
maflcko removed this from the milestone 22.1 on Oct 21, 2022
-
maflcko added this to the milestone 23.1 on Oct 21, 2022
-
doc: remove brew install sqlite from macOS docs 7698366132
-
hebasto approved
-
hebasto commented at 7:51 am on October 24, 2022: memberACK 769836613291e2b35f8ded9b594e33dcd1b1c70d, I have reviewed the code and it looks OK, I agree it can be merged.
-
stickies-v approved
-
stickies-v commented at 9:16 am on October 24, 2022: contributor
-
maflcko merged this on Oct 24, 2022
-
maflcko closed this on Oct 24, 2022
-
fanquake deleted the branch on Oct 24, 2022
-
delta1 referenced this in commit bca2e65e0e on Sep 24, 2023
-
bitcoin locked this on Oct 24, 2023
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 09:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 09:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me