Why did a subscribe API call take a long time?

+2 votes


RPC CMD DURATION: 16.518668655s

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


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