mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
ba97f49f2f
## Issue being fixed or feature implemented Some headers include other heavy headers, such as `logging.h`, `tinyformat.h`, `iostream`. These headers are heavy and increase compilation time on scale of whole project drastically because can be used in many other headers. ## What was done? Moved many heavy includes from headers to cpp files to optimize compilation time. In some places added forward declarations if it is reasonable. As side effect removed 2 circular dependencies: ``` "llmq/debug -> llmq/dkgsessionhandler -> llmq/debug" "llmq/debug -> llmq/dkgsessionhandler -> llmq/dkgsession -> llmq/debug" ``` ## How Has This Been Tested? Run build 2 times before refactoring and after refactoring: `make clean && sleep 10s; time make -j18` Before refactoring: ``` real 5m37,826s user 77m12,075s sys 6m20,547s real 5m32,626s user 76m51,143s sys 6m24,511s ``` After refactoring: ``` real 5m18,509s user 73m32,133s sys 6m21,590s real 5m14,466s user 73m20,942s sys 6m17,868s ``` ~5% of improvement for compilation time. That's not huge, but that's worth to get merged There're several more refactorings TODO but better to do them later by backports: - bitcoin/bitcoin#27636 - bitcoin/bitcoin#26286 - bitcoin/bitcoin#27238 - and maybe this one: bitcoin/bitcoin#28200 ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone |
||
---|---|---|
.. | ||
check-doc.py | ||
check-rpc-mappings.py | ||
commit-script-check.sh | ||
extended-lint-all.sh | ||
extended-lint-cppcheck.sh | ||
git-subtree-check.sh | ||
lint-all.sh | ||
lint-assertions.sh | ||
lint-circular-dependencies.sh | ||
lint-cppcheck-dash.sh | ||
lint-filenames.sh | ||
lint-format-strings.py | ||
lint-format-strings.sh | ||
lint-git-commit-check.sh | ||
lint-include-guards.sh | ||
lint-includes.sh | ||
lint-locale-dependence.sh | ||
lint-logs.sh | ||
lint-python-dead-code.sh | ||
lint-python-mutable-default-parameters.sh | ||
lint-python-utf8-encoding.sh | ||
lint-python.sh | ||
lint-qt.sh | ||
lint-rpc-help.sh | ||
lint-shebang.sh | ||
lint-shell-locale.sh | ||
lint-shell.sh | ||
lint-spelling.ignore-words.txt | ||
lint-spelling.sh | ||
lint-submodule.sh | ||
lint-tests.sh | ||
lint-whitespace.sh | ||
README.md |
This folder contains lint scripts.
check-doc.py
Check for missing documentation of command line options.
commit-script-check.sh
Verification of scripted diffs. Scripted diffs are only assumed to run on the latest LTS release of Ubuntu. Running them on other operating systems might require installing GNU tools, such as GNU sed.
git-subtree-check.sh
Run this script from the root of the repository to verify that a subtree matches the contents of the commit it claims to have been updated to.
To use, make sure that you have fetched the upstream repository branch in which the subtree is maintained:
- for
src/secp256k1
: https://github.com/bitcoin-core/secp256k1.git (branch master) - for
src/leveldb
: https://github.com/bitcoin-core/leveldb.git (branch bitcoin-fork) - for
src/univalue
: https://github.com/bitcoin-core/univalue.git (branch master) - for
src/crypto/ctaes
: https://github.com/bitcoin-core/ctaes.git (branch master) - for
src/crc32c
: https://github.com/google/crc32c.git (branch master)
Usage: git-subtree-check.sh DIR (COMMIT)
COMMIT
may be omitted, in which case HEAD
is used.
lint-all.sh
Calls other scripts with the lint-
prefix.