You are viewing a single comment's thread from:

RE: Steem Python - Speed Test

in #steemdev7 years ago (edited)

wow, great work! Does this mean that blockchain.stream_from() using get_ops_in_block is slower than streaming the full blocks via steemd.get_blocks_range()? I would not have expected that...

Hmm, but the result from get_blocks_range() is not ordered, you may get last_block + 100 in the first iteration and your loop stops after actually having received only one block... But I may be wrong here?!
edit: I was wrong, the result is ordered and 100 blocks are received

Sort:  

At least with api.steemit.com it was much faster. The get_blocks_range will fetch all 100 blocks at once, so the loop will just iterate the result to confirm it got 100 blocks. For stream_from it will fetch a new block per iteration.
So depending on real life needs, fetching batches of 100 blocks might not be feasible.

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.028
BTC 76064.81
ETH 2914.44
USDT 1.00
SBD 2.61