Branch: refs/heads/master
  Home:   https://github.com/btcsuite/btcd
  Commit: fc8dae49e41b7f2130edbea8532f2a058222e2a3
      
https://github.com/btcsuite/btcd/commit/fc8dae49e41b7f2130edbea8532f2a058222e2a3
  Author: Josh Rickmar <[email protected]>
  Date:   2015-02-06 (Fri, 06 Feb 2015)

  Changed paths:
    M blockchain/txlookup.go

  Log Message:
  -----------
  Make profiling easier to follow with static dispatch.

For example, when performing a heap profile, this:
    .          .    125:   fetchFunc := db.FetchUnSpentTxByShaList
   .          .    126:   if includeSpent {
   .          .    127:           fetchFunc = db.FetchTxByShaList
   .          .    128:   }
   .     9.11MB    129:   txReplyList := fetchFunc(txList)

Now becomes this:
    .          .    125:   var txReplyList []*database.TxListReply
   .          .    126:   if includeSpent {
   .          .    127:           txReplyList = db.FetchTxByShaList(txList)
   .          .    128:   } else {
   .     8.75MB    129:           txReplyList = 
db.FetchUnSpentTxByShaList(txList)
   .          .    130:   }

And it's clear where the majority of our allocations are coming from.


Reply via email to