Speed up RPC authentication (reworked pull from Joel Katz) #670

pull gavinandresen wants to merge 1 commits into bitcoin:master from gavinandresen:rpcauth_speedup changing 1 files +5 −7
  1. gavinandresen commented at 2:11 PM on December 1, 2011: contributor

    Caches rpc username and password in static vars, to avoid the overhead of a lookup into mapArgs. Mining pools that handle a lot of getwork calls like this.

    Note: I also did a quick benchmark of using a boost::unordered_map for mapArgs instead of a std::map, but unordered_map was slightly slower.

  2. sipa commented at 2:12 PM on December 1, 2011: member

    ACK

  3. laanwj commented at 2:34 PM on December 1, 2011: member

    Ack

  4. laanwj commented at 3:02 PM on December 1, 2011: member

    Btw if speed is really the issue here, an idea would be to cache encoded <user>:<pass> and compare the header literally, this would save a decoding step for each rpc call

  5. gavinandresen commented at 8:47 PM on December 1, 2011: contributor

    RE: store strUserPass: good idea!

  6. Speed up RPC authentication (reworked pull from Joel Katz) f81ce5bd6d
  7. gavinandresen referenced this in commit 173efb1865 on Dec 1, 2011
  8. gavinandresen merged this on Dec 1, 2011
  9. gavinandresen closed this on Dec 1, 2011

  10. coblee referenced this in commit 448b602ce1 on Jul 17, 2012
  11. ptschip referenced this in commit 4c0f390285 on Jun 13, 2017
  12. DrahtBot 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-04-15 15:16 UTC

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