can we speed up CWalletTx::GetSpendSize? #18215

issue BrannonKing opened this issue on February 27, 2020
  1. BrannonKing commented at 10:27 PM on February 27, 2020: none

    I have this perf report from a node that handles a lot of sendtoaddress calls:

    - 15.17% CWalletTx::GetSpendSize (inlined)
     - 15.13% CalculateMaximumSignedInputSize
      - 15.09% CWallet::DummySignInput (inlined)
       - 15.04% ProduceSignature
        - 14.34% SignStep
         - 13.61% GetPubKey (inlined)
          - CWallet::GetPubKey
           - 13.60% FillableSigningProvider::GetPubKey
            - 13.23% CKey::GetPubKey
             - 13.17% secp256k1_ec_pubkey_create
              - 10.71% secp256k1_ecmult_gen
               + 8.75% secp256k1_gej_add_ge
               + 1.54% secp256k1_ge_storage_cmov (inlined)
    

    Is there something I can do to optimize it or cache the results? Most transactions running through my system are pretty similar.

    I don't really care about the fees. I doubt that there's a significant difference in fees between 65 and 72 bytes. Is 72 really the maximum maximum? Maybe in the mean time I'll just hard-code it to that.

  2. BrannonKing added the label Feature on Feb 27, 2020
  3. fanquake added the label Wallet on Feb 27, 2020
  4. fanquake removed the label Feature on Feb 27, 2020
  5. promag commented at 11:53 PM on February 28, 2020: member

    Is there something I can do to optimize it or cache the results?

    Maybe, but what is the issue? Delayed sends?

  6. MarcoFalke commented at 5:25 PM on April 26, 2020: member

    The feature request didn't seem to attract much attention in the past. Also, the issue seems not important enough right now to keep it sitting around idle in the list of open issues.

    Closing due to lack of interest. Pull requests with improvements are always welcome.

  7. MarcoFalke closed this on Apr 26, 2020

  8. DrahtBot locked this on Feb 15, 2022

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-04-21 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me