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

pull lucash-dev wants to merge 1 commits into bitcoin:master from lucash-dev:speedup-knapsack-solver-test changing 1 files +36 −25
  1. lucash-dev commented at 2:59 AM on June 8, 2018: contributor

    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.

  2. fanquake added the label Tests on Jun 8, 2018
  3. achow101 commented at 4:09 AM on June 8, 2018: member

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

  4. laanwj commented at 4:05 PM on June 8, 2018: member

    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.

  5. DrahtBot commented at 5:19 PM on June 8, 2018: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->No more conflicts as of last run.

  6. practicalswift commented at 8:44 PM on June 10, 2018: contributor

    Concept ACK

  7. DrahtBot added the label Needs rebase on Jul 24, 2018
  8. 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.
    a679109be4
  9. lucash-dev commented at 1:47 AM on August 11, 2018: contributor

    Rebased.

  10. DrahtBot removed the label Needs rebase on Aug 11, 2018
  11. DrahtBot cross-referenced this on Sep 7, 2018 from issue Replace coin selection fallback strategy with Single Random Draw by achow101
  12. laanwj commented at 7:29 AM on September 11, 2018: member

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

  13. laanwj merged this on Sep 11, 2018
  14. laanwj closed this on Sep 11, 2018

  15. laanwj referenced this in commit e3fec3cfa8 on Sep 11, 2018
  16. MarcoFalke commented at 5:30 PM on September 12, 2018: member
  17. lucash-dev deleted the branch on Sep 15, 2018
  18. Bushstar cross-referenced this on Oct 11, 2018 from issue Updates from bitcoin/master by Bushstar
  19. jasonbcox referenced this in commit 06c02066ff on Dec 20, 2019
  20. jonspock referenced this in commit 87d07da2e3 on Jan 10, 2020
  21. proteanx referenced this in commit 933957539a on Jan 10, 2020
  22. Munkybooty referenced this in commit 5b5a76e4eb on Jul 7, 2021
  23. Munkybooty referenced this in commit c2d9621ec7 on Jul 8, 2021
  24. Munkybooty referenced this in commit e427d09b5e on Jul 9, 2021
  25. Munkybooty referenced this in commit 3e388c6c91 on Jul 11, 2021
  26. bitcoin locked this on Sep 8, 2021

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: 2026-05-20 06:55 UTC