-
Notifications
You must be signed in to change notification settings - Fork 37.7k
[tests] Speed up knapsack_solver_test by not recreating wallet 100 times. #13419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
laanwj
merged 1 commit into
bitcoin:master
from
lucash-dev:speedup-knapsack-solver-test
Sep 11, 2018
Merged
[tests] Speed up knapsack_solver_test by not recreating wallet 100 times. #13419
laanwj
merged 1 commit into
bitcoin:master
from
lucash-dev:speedup-knapsack-solver-test
Sep 11, 2018
+36
−25
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I don't think this is entirely useful considering that this test will be removed (hopefully soon) altogether by #13307. |
No more conflicts as of last run. |
Concept ACK |
Moved the code for creating the wallet out of the 100-times repetition loop, for the most time-consuming tests.
Rebased. |
It's months later and #13307 is still in state of flux. I'm going ahead and merging this. |
laanwj
added a commit
that referenced
this pull request
Sep 11, 2018
… wallet 100 times. a679109 Speed up knapsack_solver_test by not recreating wallet 100 times. (lucash.dev@gmail.com) Pull request description: Optimization of `knapsack_solver_test`by moving an expensive wallet creation to outside a 100x for loop. On my (slow) machine: ``` before: 9.8s after: 6.2s -------------------- saved: 3.6s (36%) ``` This PR was split from #13050. Also see #10026. Tree-SHA512: bde1a856b5f076a5845e14d1a924855c8c91742c3139b47903081289b21d01fef6f2d1fd8947058728a57de56f877bab3866af8cd1d25ba2daa44411752cdb2f
🎉 Congratz on halving the total memory usage of |
jasonbcox
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Dec 20, 2019
… wallet 100 times. Summary: a679109be40491222c458fdbef58f68509dae0bd Speed up knapsack_solver_test by not recreating wallet 100 times. (lucash.dev@gmail.com) Pull request description: Optimization of `knapsack_solver_test`by moving an expensive wallet creation to outside a 100x for loop. On my (slow) machine: ``` before: 9.8s after: 6.2s -------------------- saved: 3.6s (36%) ``` This PR was split from #13050. Also see #10026. Tree-SHA512: bde1a856b5f076a5845e14d1a924855c8c91742c3139b47903081289b21d01fef6f2d1fd8947058728a57de56f877bab3866af8cd1d25ba2daa44411752cdb2f Backport of Core PR13419 bitcoin/bitcoin#13419 Review note: Easier to see changes if you hide white space changes (https://github.com/bitcoin/bitcoin/pull/13419/files?utf8=%E2%9C%93&diff=split&w=1) Test Plan: make check time(./test_bitcoin --run_test=coinselector_tests/knapsack_solver_test) Pre-patch: real 0m4.841s user 0m4.764s sys 0m0.076s Post-patch: real 0m2.340s user 0m2.328s sys 0m0.008s Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc Differential Revision: https://reviews.bitcoinabc.org/D4760
jonspock
pushed a commit
to jonspock/devault
that referenced
this pull request
Jan 10, 2020
… wallet 100 times. Summary: a679109be40491222c458fdbef58f68509dae0bd Speed up knapsack_solver_test by not recreating wallet 100 times. (lucash.dev@gmail.com) Pull request description: Optimization of `knapsack_solver_test`by moving an expensive wallet creation to outside a 100x for loop. On my (slow) machine: ``` before: 9.8s after: 6.2s -------------------- saved: 3.6s (36%) ``` This PR was split from #13050. Also see #10026. Tree-SHA512: bde1a856b5f076a5845e14d1a924855c8c91742c3139b47903081289b21d01fef6f2d1fd8947058728a57de56f877bab3866af8cd1d25ba2daa44411752cdb2f Backport of Core PR13419 bitcoin/bitcoin#13419 Review note: Easier to see changes if you hide white space changes (https://github.com/bitcoin/bitcoin/pull/13419/files?utf8=%E2%9C%93&diff=split&w=1) Test Plan: make check time(./test_bitcoin --run_test=coinselector_tests/knapsack_solver_test) Pre-patch: real 0m4.841s user 0m4.764s sys 0m0.076s Post-patch: real 0m2.340s user 0m2.328s sys 0m0.008s Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc Differential Revision: https://reviews.bitcoinabc.org/D4760
proteanx
pushed a commit
to devaultcrypto/devault
that referenced
this pull request
Jan 10, 2020
… wallet 100 times. Summary: a679109be40491222c458fdbef58f68509dae0bd Speed up knapsack_solver_test by not recreating wallet 100 times. (lucash.dev@gmail.com) Pull request description: Optimization of `knapsack_solver_test`by moving an expensive wallet creation to outside a 100x for loop. On my (slow) machine: ``` before: 9.8s after: 6.2s -------------------- saved: 3.6s (36%) ``` This PR was split from #13050. Also see #10026. Tree-SHA512: bde1a856b5f076a5845e14d1a924855c8c91742c3139b47903081289b21d01fef6f2d1fd8947058728a57de56f877bab3866af8cd1d25ba2daa44411752cdb2f Backport of Core PR13419 bitcoin/bitcoin#13419 Review note: Easier to see changes if you hide white space changes (https://github.com/bitcoin/bitcoin/pull/13419/files?utf8=%E2%9C%93&diff=split&w=1) Test Plan: make check time(./test_bitcoin --run_test=coinselector_tests/knapsack_solver_test) Pre-patch: real 0m4.841s user 0m4.764s sys 0m0.076s Post-patch: real 0m2.340s user 0m2.328s sys 0m0.008s Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc Differential Revision: https://reviews.bitcoinabc.org/D4760
Munkybooty
pushed a commit
to Munkybooty/dash
that referenced
this pull request
Jul 7, 2021
…reating wallet 100 times. a679109 Speed up knapsack_solver_test by not recreating wallet 100 times. (lucash.dev@gmail.com) Pull request description: Optimization of `knapsack_solver_test`by moving an expensive wallet creation to outside a 100x for loop. On my (slow) machine: ``` before: 9.8s after: 6.2s -------------------- saved: 3.6s (36%) ``` This PR was split from bitcoin#13050. Also see bitcoin#10026. Tree-SHA512: bde1a856b5f076a5845e14d1a924855c8c91742c3139b47903081289b21d01fef6f2d1fd8947058728a57de56f877bab3866af8cd1d25ba2daa44411752cdb2f
Munkybooty
pushed a commit
to Munkybooty/dash
that referenced
this pull request
Jul 8, 2021
…reating wallet 100 times. a679109 Speed up knapsack_solver_test by not recreating wallet 100 times. (lucash.dev@gmail.com) Pull request description: Optimization of `knapsack_solver_test`by moving an expensive wallet creation to outside a 100x for loop. On my (slow) machine: ``` before: 9.8s after: 6.2s -------------------- saved: 3.6s (36%) ``` This PR was split from bitcoin#13050. Also see bitcoin#10026. Tree-SHA512: bde1a856b5f076a5845e14d1a924855c8c91742c3139b47903081289b21d01fef6f2d1fd8947058728a57de56f877bab3866af8cd1d25ba2daa44411752cdb2f
Munkybooty
pushed a commit
to Munkybooty/dash
that referenced
this pull request
Jul 9, 2021
…reating wallet 100 times. a679109 Speed up knapsack_solver_test by not recreating wallet 100 times. (lucash.dev@gmail.com) Pull request description: Optimization of `knapsack_solver_test`by moving an expensive wallet creation to outside a 100x for loop. On my (slow) machine: ``` before: 9.8s after: 6.2s -------------------- saved: 3.6s (36%) ``` This PR was split from bitcoin#13050. Also see bitcoin#10026. Tree-SHA512: bde1a856b5f076a5845e14d1a924855c8c91742c3139b47903081289b21d01fef6f2d1fd8947058728a57de56f877bab3866af8cd1d25ba2daa44411752cdb2f
Munkybooty
pushed a commit
to Munkybooty/dash
that referenced
this pull request
Jul 11, 2021
…reating wallet 100 times. a679109 Speed up knapsack_solver_test by not recreating wallet 100 times. (lucash.dev@gmail.com) Pull request description: Optimization of `knapsack_solver_test`by moving an expensive wallet creation to outside a 100x for loop. On my (slow) machine: ``` before: 9.8s after: 6.2s -------------------- saved: 3.6s (36%) ``` This PR was split from bitcoin#13050. Also see bitcoin#10026. Tree-SHA512: bde1a856b5f076a5845e14d1a924855c8c91742c3139b47903081289b21d01fef6f2d1fd8947058728a57de56f877bab3866af8cd1d25ba2daa44411752cdb2f
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Optimization of
knapsack_solver_test
by moving an expensive wallet creation to outside a 100x for loop.On my (slow) machine:
This PR was split from #13050. Also see #10026.