Skip to content
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

[tests] Speed up knapsack_solver_test by not recreating wallet 100 times. #13419

Merged
merged 1 commit into from Sep 11, 2018

Conversation

Projects
None yet
7 participants
@lucash-dev
Copy link
Contributor

commented Jun 8, 2018

Optimization of knapsack_solver_testby 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.

@fanquake fanquake added the Tests label Jun 8, 2018

@achow101

This comment has been minimized.

Copy link
Member

commented Jun 8, 2018

I don't think this is entirely useful considering that this test will be removed (hopefully soon) altogether by #13307.

@laanwj

This comment has been minimized.

Copy link
Member

commented Jun 8, 2018

I don't think this is entirely useful considering that this test will be removed (hopefully soon) altogether by #13307.

On the other hand this change is pretty straightforward, and might make sense until #13307 is merged.

@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2018

No more conflicts as of last run.
@practicalswift

This comment has been minimized.

Copy link
Member

commented Jun 10, 2018

Concept ACK

Speed up knapsack_solver_test by not recreating wallet 100 times.
Moved the code for creating the wallet out of the 100-times repetition loop, for the most time-consuming tests.

@lucash-dev lucash-dev force-pushed the lucash-dev:speedup-knapsack-solver-test branch to a679109 Aug 11, 2018

@lucash-dev

This comment has been minimized.

Copy link
Contributor Author

commented Aug 11, 2018

Rebased.

@laanwj

This comment has been minimized.

Copy link
Member

commented Sep 11, 2018

It's months later and #13307 is still in state of flux. I'm going ahead and merging this.

@laanwj laanwj merged commit a679109 into bitcoin:master Sep 11, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Sep 11, 2018

Merge #13419: [tests] Speed up knapsack_solver_test by not recreating…
… 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
@MarcoFalke

This comment has been minimized.

Copy link
Member

commented Sep 12, 2018

@lucash-dev lucash-dev deleted the lucash-dev:speedup-knapsack-solver-test branch Sep 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.