These are a subset of my bitcoin-4diff patches. #426

pull JoelKatz wants to merge 2 commits into bitcoin:master from JoelKatz:JoelKatzUpdates changing 4 files +96 −28
  1. JoelKatz commented at 6:04 AM on July 23, 2011: contributor

    These are a subset of my bitcoin-4diff patches have been well-tested against the latest release version.

    Cache the RPC user and password in strRPCUser/strRPCPass so that they don't need to be extracted on each RPC call.

    Fix a memory leak in the pthreads version of CreateThread.

  2. These are a subset of my bitcoin-4diff patches have been well-tested against
    the latest release version.
    
    Cache the RPC user and password in strRPCUser/strRPCPass so that they don't
    need to be extracted on each RPC call.
    
    Fix a memory leak in the pthreads version of CreateThread.
    9390ea5a24
  3. jgarzik commented at 4:57 PM on July 23, 2011: contributor

    Why is the user/pass cached? map access is very, very fast, so it seems unlikely that it would ever show up on a profile?

    Was this just a guess, or do you have any data showing a positive impact from that change?

  4. JoelKatz commented at 7:03 AM on July 24, 2011: contributor

    All of my micro-optimizations are a result of benchmarking. The map access is fast in the sense that it scales well even if there are a large number of entries in the map. It is, however, slow if the map is very small. (In fairness, my benchmark was hitting the client with massive numbers of RPC requests.)

  5. Additional optimization from 4diff. d0169de0f9
  6. JoelKatz commented at 7:36 AM on July 24, 2011: contributor

    Latest patches add much faster HexStr and faster Base64 decode. These changes were made based on profiling. Again, the profiled workload was large numbers of RPC requests, primarily 'getwork'. So they primarily benefit controllers for pooled mining. (See the Bitcoin forums, several large pools are using these patches.)

  7. JoelKatz commented at 7:22 PM on July 25, 2011: contributor

    While people who do large numbers of 'getwork' requests are certainly minority users of the code in terms of number of installations, they have a disproportionate affect on things like which transactions wind up in the public hash chain. They will need optimizations to the RPC/JSON/getwork paths. The issue is whether those optimizations will be maintained as a fork or merged into the mainline. That's really a code policy issue that transcends the issue of these specific patches.

  8. jgarzik commented at 8:54 PM on July 25, 2011: contributor

    Code review issue: these commits must be redone with a useful commit message.

    The first line of any git commit must be a one-line summary of logical code change. Further lines, if any, elaborate and describe the change in detail.

    Any user using "git shortlog" will receive an incomprehensible summary: "These are a subset of my bitcoin-4diff patches have been well-tested against" That tells the user absolutely nothing about the change.

    Neither does "Additional optimization from 4diff." tell us anything about -what- is the optimization, and -where- in the code it occurred.

  9. JoelKatz commented at 9:44 PM on July 25, 2011: contributor

    Ahh, okay. I haven't used github before. In the systems I am used to, it is the code that is pulled.

  10. JoelKatz closed this on Jul 25, 2011

  11. dexX7 referenced this in commit 8af9eae626 on Nov 13, 2016
  12. ptschip referenced this in commit 3f9a8f631b on Apr 24, 2017
  13. classesjack referenced this in commit 2af38884ba on Jan 2, 2018
  14. rajarshimaitra referenced this in commit 930a76c09f on Aug 5, 2021
  15. DrahtBot locked this on Sep 8, 2021
Contributors

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-26 09:16 UTC

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