Why did a subscribe API call take a long time?

+2 votes

{"id":"multichain-client","jsonrpc":"1.0","method":"subscribe","params":["837B4DB1DBB113F511D3F1EBE01C19A7"]}

RPC CMD DURATION: 16.518668655s

All my other RPC calls seem normal. This is giving me responses between 14-20 seconds.

Thanks.

asked Jun 21, 2018 by anonymous
reshown Jun 21, 2018 by MultiChain

1 Answer

0 votes

This is due to the rescanning of the blockchain to find items in that stream. To improve performance, consider subscribing to multiple streams at once, or (if you don't care about previous items published in the stream) pass false for the rescan parameter.

answered Jun 21, 2018 by MultiChain
...