Open heifner opened 1 month ago
get_info
is pushed to the read-only queue. In an API node with --read-only-thread
configured, get_info
will be serviced by read-only threads.
Do we want to have a dedicated thread for get_info
?
If we cache get_info_results
on every accept_block signal, will it be a waste if no get_info
is called?
I don't think we want a dedicated thread for get_info
, just the http thread pool.
If get_info
is not called then yes it is a waste to update the info on every accept_block
. However, this seems like a good trade-off. We can disable this logic if chain_api_plugin
is not enabled.
Thanks.
Why do the existing read-only threads not help here?
it is a waste to update the info on every accept_block
I doubt that the cost of doing this is even measurable. I wouldn't worry about it.
Currently
/v1/chain/get_info
processing is posted to the main thread.get_info
could be moved off the main thread by copying the current get_info data into theget_info_results
struct on everyaccept_block
signal. Thenget_info
could be handled completely off the main thread.See https://github.com/AntelopeIO/leap/issues/1212 for original issue which includes EOS Nation API usage graphs.