bitshares / bitshares1-core

Software to run the old chain (before 2015-10-13). Code for current chain is https://github.com/bitshares/bitshares-core
https://bitshares.org/
The Unlicense
219 stars 174 forks source link

bts/0.9.0 blockchain_list_key_balances #1523

Closed jcalfee closed 9 years ago

jcalfee commented 9 years ago

Comparing 0.8.0 to 0.9.0, this call took about 1 seconds, it now takes about 4 seconds. The hosted wallet will be affected.

blockchain_list_key_balances "BTS6iTNEs8RvZYdNsoZW2XojhR1fyMDywgB2tWSy2WXmgUqsUnqPR"

jcalfee commented 9 years ago

Much better .. thank you!

abitmore commented 9 years ago

The API is implemented as iterating a hash table to find matching records, it's time inefficient anyway, since complexity is O(n) or say linear. We're using a cache for address->whatever pairs in wallet db, is it possible to cache like that in chain db (a trade-off) ?

abitmore commented 9 years ago

Update: I am talking about inefficiency of calling scan_balances.