Skip to content

Conversation

practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Jun 23, 2019

Reduce compile-time memory usage by 2%, compilation time by 2% and avoid unnecessary recompiles by removing unused includes.


The total accumulated max RSS usage is reduced by 2% (roughly -3564 MB, low variance measurement).

The total compilation time is reduced by 2% (roughly -73 seconds in user CPU time, slightly higher variance measurement).

Commits:

  • Reduce memory usage during build by not including unused C++ standard library headers
  • Reduce memory usage during build by not including unused C compatibility headers
  • Reduce memory usage during build by not including unused headers (project local headers and headers for external dependencies)
  • Minimise includes and simplify header analysis/reasoning by splitting the core_io.h into the expected core_read.h/core_write.h (matching core_read.cpp/core_write.cpp)

The two first commits account for half of the speedup and the third commit account for the other half.

This PR is a follow-up to the merged PR #16129 which reduced max RSS and compilation time by 2%.


Comparing max memory usage (RSS) between old revision 2cbcc55 (branch master) and new revision fd2f303 (branch cut-compilation-bloat):

File Old New Diff Percent
bench/bench_bench_bitcoin-bench_bitcoin.o 235 MB 218 MB -18 MB -7 %
bench/bench_bench_bitcoin-verify_script.o 218 MB 178 MB -39 MB -18 %
libbitcoin_common_a-netbase.o 281 MB 263 MB -17 MB -6 %
libbitcoin_common_a-protocol.o 236 MB 218 MB -18 MB -8 %
libbitcoin_common_a-warnings.o 212 MB 194 MB -17 MB -8 %
libbitcoin_server_a-addrman.o 286 MB 269 MB -17 MB -6 %
libbitcoin_server_a-banman.o 253 MB 235 MB -17 MB -7 %
libbitcoin_server_a-dbwrapper.o 287 MB 270 MB -17 MB -6 %
libbitcoin_server_a-flatfile.o 239 MB 221 MB -18 MB -7 %
libbitcoin_server_a-httprpc.o 398 MB 363 MB -35 MB -9 %
libbitcoin_server_a-timedata.o 257 MB 239 MB -18 MB -7 %
libbitcoin_server_a-torcontrol.o 604 MB 504 MB -99 MB -16 %
libbitcoin_util_a-chainparamsbase.o 225 MB 208 MB -17 MB -8 %
qt/qt_libbitcoinqt_a-bitcoin.o 595 MB 498 MB -97 MB -16 %
qt/qt_libbitcoinqt_a-moc_bantablemodel.o 304 MB 199 MB -105 MB -35 %
qt/qt_libbitcoinqt_a-receivecoinsdialog.o 585 MB 471 MB -114 MB -19 %
qt/qt_libbitcoinqt_a-sendcoinsdialog.o 809 MB 706 MB -103 MB -13 %
qt/qt_libbitcoinqt_a-signverifymessagedialog.o 620 MB 400 MB -220 MB -36 %
qt/test/qt_test_test_bitcoin_qt-moc_rpcnestedtests.o 438 MB 145 MB -293 MB -67 %
qt/test/qt_test_test_bitcoin_qt-test_main.o 539 MB 438 MB -102 MB -19 %
rpc/libbitcoin_cli_a-client.o 263 MB 246 MB -17 MB -6 %
rpc/libbitcoin_common_a-rawtransaction_util.o 423 MB 395 MB -28 MB -7 %
rpc/libbitcoin_common_a-util.o 408 MB 384 MB -23 MB -6 %
rpc/libbitcoin_util_a-protocol.o 258 MB 241 MB -17 MB -7 %
test/bench_bench_bitcoin-util.o 613 MB 518 MB -95 MB -15 %
test/test_test_bitcoin-bech32_tests.o 541 MB 513 MB -28 MB -5 %
test/test_test_bitcoin-fs_tests.o 540 MB 513 MB -27 MB -5 %
test/test_test_bitcoin-reverselock_tests.o 549 MB 520 MB -29 MB -5 %
util/libbitcoin_util_a-error.o 220 MB 202 MB -18 MB -8 %
util/libbitcoin_util_a-moneystr.o 108 MB 81 MB -27 MB -25 %
util/libbitcoin_util_a-threadnames.o 69 MB 48 MB -21 MB -31 %
wallet/libbitcoin_wallet_a-walletutil.o 249 MB 232 MB -17 MB -7 %
zmq/libbitcoin_zmq_a-zmqrpc.o 347 MB 326 MB -21 MB -6 %
... suppressing 421 unchanged measurements ... ... ... ... ...
Average (N=454) 321 MB 313 MB -8 MB -2 %
Sum (N=454) 145549 MB 141986 MB -3564 MB -2 %

Comparing build time (user CPU time) between old revision 2cbcc55 (branch master) and new revision fd2f303 (branch cut-compilation-bloat), listing filenames and individual results only for files with a measured change in max memory usage (RSS) to reduce noise:

File Old New Diff Percent
bench/bench_bench_bitcoin-bench_bitcoin.o 3 s. 3 s. -0 s. -5 %
bench/bench_bench_bitcoin-verify_script.o 4 s. 3 s. -1 s. -15 %
libbitcoin_common_a-netbase.o 6 s. 6 s. -0 s. -1 %
libbitcoin_common_a-protocol.o 4 s. 4 s. -0 s. -7 %
libbitcoin_common_a-warnings.o 3 s. 3 s. -0 s. -9 %
libbitcoin_server_a-addrman.o 5 s. 5 s. -0 s. -3 %
libbitcoin_server_a-banman.o 4 s. 4 s. -0 s. -0 %
libbitcoin_server_a-dbwrapper.o 6 s. 6 s. -0 s. -1 %
libbitcoin_server_a-flatfile.o 4 s. 4 s. -0 s. -1 %
libbitcoin_server_a-httprpc.o 9 s. 8 s. -1 s. -8 %
libbitcoin_server_a-timedata.o 4 s. 4 s. -0 s. -2 %
libbitcoin_server_a-torcontrol.o 15 s. 12 s. -2 s. -17 %
libbitcoin_util_a-chainparamsbase.o 3 s. 3 s. -0 s. -6 %
qt/qt_libbitcoinqt_a-bitcoin.o 13 s. 10 s. -3 s. -25 %
qt/qt_libbitcoinqt_a-moc_bantablemodel.o 4 s. 2 s. -1 s. -36 %
qt/qt_libbitcoinqt_a-receivecoinsdialog.o 11 s. 8 s. -3 s. -31 %
qt/qt_libbitcoinqt_a-sendcoinsdialog.o 16 s. 14 s. -1 s. -7 %
qt/qt_libbitcoinqt_a-signverifymessagedialog.o 12 s. 8 s. -4 s. -36 %
qt/test/qt_test_test_bitcoin_qt-moc_rpcnestedtests.o 6 s. 2 s. -5 s. -72 %
qt/test/qt_test_test_bitcoin_qt-test_main.o 10 s. 7 s. -3 s. -28 %
rpc/libbitcoin_cli_a-client.o 4 s. 4 s. -0 s. -3 %
rpc/libbitcoin_common_a-rawtransaction_util.o 9 s. 9 s. -0 s. -3 %
rpc/libbitcoin_common_a-util.o 9 s. 8 s. -0 s. -2 %
rpc/libbitcoin_util_a-protocol.o 5 s. 5 s. -0 s. -1 %
test/bench_bench_bitcoin-util.o 13 s. 9 s. -4 s. -31 %
test/test_test_bitcoin-bech32_tests.o 11 s. 11 s. -1 s. -5 %
test/test_test_bitcoin-fs_tests.o 11 s. 11 s. -1 s. -5 %
test/test_test_bitcoin-reverselock_tests.o 12 s. 11 s. -1 s. -6 %
util/libbitcoin_util_a-error.o 3 s. 3 s. -0 s. -4 %
util/libbitcoin_util_a-moneystr.o 2 s. 1 s. -0 s. -24 %
util/libbitcoin_util_a-threadnames.o 1 s. 0 s. -0 s. -35 %
wallet/libbitcoin_wallet_a-walletutil.o 4 s. 4 s. -0 s. -4 %
zmq/libbitcoin_zmq_a-zmqrpc.o 6 s. 5 s. -1 s. -9 %
... suppressing 421 measurements ... ... ... ... ...
Average (N=454) 7 s. 6 s. -0 s. -2 %
Sum (N=454) 2994 s. 2921 s. -73 s. -2 %

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 23, 2019

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16440 (BIP-322: Generic signed message format by kallewoof)
  • #16341 (Introduce ScriptPubKeyMan interface and use it for key and script management (aka wallet boxes) by achow101)
  • #16324 (Get cs_main out of the critical path in ProcessMessages by TheBlueMatt)
  • #16323 (Call ProcessNewBlock() asynchronously by TheBlueMatt)
  • #16248 (Make whitebind/whitelist permissions more flexible by NicolasDorier)
  • #16224 (gui: Bilingual GUI error messages by hebasto)
  • #15934 (Separate settings merging from parsing by ryanofsky)
  • #15382 ([util] add runCommandParseJSON by Sjors)
  • #15294 ([moveonly] wallet: Extract RipeMd160 by Empact)
  • #14046 (net: Refactor message parsing (CNetMessage), adds flexibility by jonasschnelli)
  • #13789 (crypto/sha256: Use pragmas to enforce necessary intrinsics for GCC and Clang by luke-jr)
  • #13686 (ZMQ: Small cleanups in the ZMQ code by domob1812)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@hebasto
Copy link
Member

hebasto commented Jun 24, 2019

Just wondering what is a proper way to test such PRs?

@maflcko
Copy link
Member

maflcko commented Jun 24, 2019

Could create a separate pull for all changes in src/bench/ src/test src/wallet/test/?

@practicalswift
Copy link
Contributor Author

@MarcoFalke Good idea! Submitted as #16278 :-)

@practicalswift practicalswift force-pushed the cut-compilation-bloat branch from fd2f303 to b09ec5e Compare June 25, 2019 11:22
@practicalswift practicalswift force-pushed the cut-compilation-bloat branch 2 times, most recently from 37f3047 to 67fc141 Compare June 25, 2019 12:45
@practicalswift practicalswift changed the title refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes refactor: Reduce compile-time memory usage by 2 %, compilation time by 2% and avoid unnecessary recompiles by removing unused includes Jun 27, 2019
@practicalswift practicalswift changed the title refactor: Reduce compile-time memory usage by 2 %, compilation time by 2% and avoid unnecessary recompiles by removing unused includes refactor: Reduce compile-time memory usage by 2%, compilation time by 2% and avoid unnecessary recompiles by removing unused includes Jun 27, 2019
@Sjors
Copy link
Member

Sjors commented Jun 27, 2019

Good idea to move the tests to #16027. The commit splitting core_io.h into the ex… …pected core_read.h/core_write.h could also be a separate PR if this ends up taking longer.

This touches quite a few other PRs, but I suspect most won't trigger a rebase. Otherwise it would be best to merge this right after a major release (@MarcoFalke would be cool if @DrahtBot could tell). So concept ACK.

Suggest moving "Reduce memory usage during build by" from the commit name(s) to the commit message(s); emphasize what you're changing in the title, and why in the message.

I was able to run unit and functional* tests on macOS with 67fc141 (rebased on on master).

  • except p2p_invalid_messages.py as usual

pull bot pushed a commit to uniibu/bitcoin that referenced this pull request Jun 27, 2019
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb
@practicalswift practicalswift force-pushed the cut-compilation-bloat branch 2 times, most recently from 45911a0 to 50730e6 Compare June 27, 2019 15:24
@maflcko maflcko changed the title refactor: Reduce compile-time memory usage by 2%, compilation time by 2% and avoid unnecessary recompiles by removing unused includes refactor: Remove unused includes Jun 27, 2019
core_memusage.h \
core_read.h \
core_write.h \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you keep the header and make this core_io.cpp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is an option but it would introduce 18 (9 * 2) additional unused includes. Is it worth that cost?

Reasoning:

core_write.h includes string, amount.h and stdint.h (via amount.h).

core_read.h includes string, vector and attributes.h.

The following files include only one of core_read.h and core_write.h:

$ git grep -E '^#include <(core_read|core_write)\.h>' -- "*.cpp" "*.h" | \
    cut -f1 -d: | uniq -c | grep ' 1 '
      1 src/core_read.cpp
      1 src/core_write.cpp
      1 src/qt/transactiontablemodel.cpp
      1 src/rpc/blockchain.cpp
      1 src/rpc/net.cpp
      1 src/test/blockfilter_tests.cpp
      1 src/test/rpc_tests.cpp
      1 src/test/transaction_tests.cpp
      1 src/wallet/rpcdump.cpp

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem like 18 very small includes. I'm fine with either splitting in read/write or having one io.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that they are not worth the effort, also you can avoid them by putting using CAmount=... instead of the full header.

Copy link
Contributor Author

@practicalswift practicalswift Jun 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel strongly about this. I'll let others chime in and update according to the consensus opinion.

@MarcoFalke I take it I have your Concept ACK? Mind making it explicit in a standalone comment?

@practicalswift
Copy link
Contributor Author

practicalswift commented Jun 27, 2019

@Sjors Thanks for taking the time to review and test!

Good point about the commit messages! I've now changed that. I guess I was eager to explain the why to also reach those who form their judgement based on PR metadata alone: the GitHub equivalent of having an opinion about the content of a news article after only reading the title :-)

@practicalswift practicalswift force-pushed the cut-compilation-bloat branch 2 times, most recently from 3d31f1c to 9c9d6a3 Compare June 28, 2019 13:43
@practicalswift
Copy link
Contributor Author

practicalswift commented Jul 2, 2019

Just wondering what is a proper way to test such PRs?

Making sure we compile and pass the test suite (both functional and unit tests) on supported platforms would be the obvious starting point for testing I guess? :-)

@practicalswift practicalswift force-pushed the cut-compilation-bloat branch 2 times, most recently from 5e50bce to b772d35 Compare July 3, 2019 21:28
@practicalswift
Copy link
Contributor Author

Rebased! :-)

@practicalswift
Copy link
Contributor Author

Rebased! :-)

@practicalswift practicalswift force-pushed the cut-compilation-bloat branch 2 times, most recently from 5aa2fdb to 66f338e Compare July 20, 2019 11:30
@practicalswift
Copy link
Contributor Author

Rebased! :-)

@maflcko
Copy link
Member

maflcko commented Aug 14, 2019

@practicalswift While this is probably nothing to be merged as-is, I still liked having the pull request open. You might have noticed that I fixed the includes in files that I touched based on the diff in this pull. Would you mind re-opening and/or sharing the steps you took to generate this list?

I tried to run iwyu once, but I wasn't really successful. So if your solution works better, why not put a comment in #15442?

maflcko pushed a commit that referenced this pull request Oct 16, 2019
084e17c Remove unused includes (practicalswift)

Pull request description:

  As requested by MarcoFalke in #16273 (comment):

  This PR removes unused includes.

  Please note that in contrast to #16273 I'm limiting the scope to the trivial cases of pure removals (i.e. no includes added) to make reviewing easier.

  I'm seeking "Concept ACK":s for this obviously non-urgent minor cleanup.

  Rationale:
  * Avoids unnecessary re-compiles in case of header changes.
  * Makes reasoning about code dependencies easier.
  * Reduces compile-time memory usage.
  * Reduces compilation time.
  * Warm fuzzy feeling of being lean :-)

ACKs for top commit:
  ryanofsky:
    Code review ACK 084e17c. PR only removes include lines and it still compiles. In the worst case someone might have to explicitly add an include later for something now included implicitly. But maybe some effort was taken to avoid this, and it wouldn't be a tragedy anyway.

Tree-SHA512: 89de56edc6ceea4696e9579bccff10c80080821685b9fb4e8c5ef593b6e43cf662f358788701bb09f84867693f66b2e4db035b92b522a0a775f50b7ecffd6a6d
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 18, 2019
084e17c Remove unused includes (practicalswift)

Pull request description:

  As requested by MarcoFalke in bitcoin#16273 (comment):

  This PR removes unused includes.

  Please note that in contrast to bitcoin#16273 I'm limiting the scope to the trivial cases of pure removals (i.e. no includes added) to make reviewing easier.

  I'm seeking "Concept ACK":s for this obviously non-urgent minor cleanup.

  Rationale:
  * Avoids unnecessary re-compiles in case of header changes.
  * Makes reasoning about code dependencies easier.
  * Reduces compile-time memory usage.
  * Reduces compilation time.
  * Warm fuzzy feeling of being lean :-)

ACKs for top commit:
  ryanofsky:
    Code review ACK 084e17c. PR only removes include lines and it still compiles. In the worst case someone might have to explicitly add an include later for something now included implicitly. But maybe some effort was taken to avoid this, and it wouldn't be a tragedy anyway.

Tree-SHA512: 89de56edc6ceea4696e9579bccff10c80080821685b9fb4e8c5ef593b6e43cf662f358788701bb09f84867693f66b2e4db035b92b522a0a775f50b7ecffd6a6d
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jun 15, 2020
Summary:
084e17cebd424b8e8ced674bc810eef4e6ee5d3b Remove unused includes (practicalswift)

Pull request description:

  As requested by MarcoFalke in bitcoin/bitcoin#16273 (comment):

  This PR removes unused includes.

  Please note that in contrast to #16273 I'm limiting the scope to the trivial cases of pure removals (i.e. no includes added) to make reviewing easier.

  I'm seeking "Concept ACK":s for this obviously non-urgent minor cleanup.

  Rationale:
  * Avoids unnecessary re-compiles in case of header changes.
  * Makes reasoning about code dependencies easier.
  * Reduces compile-time memory usage.
  * Reduces compilation time.
  * Warm fuzzy feeling of being lean :-)

ACKs for top commit:
  ryanofsky:
    Code review ACK 084e17cebd424b8e8ced674bc810eef4e6ee5d3b. PR only removes include lines and it still compiles. In the worst case someone might have to explicitly add an include later for something now included implicitly. But maybe some effort was taken to avoid this, and it wouldn't be a tragedy anyway.

---

Backport of Core [[bitcoin/bitcoin#16659 | PR16659]]

Test Plan:
  ninja check-all
  ninja

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6586
@practicalswift practicalswift deleted the cut-compilation-bloat branch April 10, 2021 19:38
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 23, 2021
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 23, 2021
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 24, 2021
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 25, 2021
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 26, 2021
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb
PastaPastaPasta pushed a commit to dashpay/dash that referenced this pull request Nov 30, 2021
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 13, 2021
084e17c Remove unused includes (practicalswift)

Pull request description:

  As requested by MarcoFalke in bitcoin#16273 (comment):

  This PR removes unused includes.

  Please note that in contrast to bitcoin#16273 I'm limiting the scope to the trivial cases of pure removals (i.e. no includes added) to make reviewing easier.

  I'm seeking "Concept ACK":s for this obviously non-urgent minor cleanup.

  Rationale:
  * Avoids unnecessary re-compiles in case of header changes.
  * Makes reasoning about code dependencies easier.
  * Reduces compile-time memory usage.
  * Reduces compilation time.
  * Warm fuzzy feeling of being lean :-)

ACKs for top commit:
  ryanofsky:
    Code review ACK 084e17c. PR only removes include lines and it still compiles. In the worst case someone might have to explicitly add an include later for something now included implicitly. But maybe some effort was taken to avoid this, and it wouldn't be a tragedy anyway.

Tree-SHA512: 89de56edc6ceea4696e9579bccff10c80080821685b9fb4e8c5ef593b6e43cf662f358788701bb09f84867693f66b2e4db035b92b522a0a775f50b7ecffd6a6d
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants