planetarium / 9c-launcher

Nine Chronicles Launcher
GNU General Public License v3.0
44 stars 40 forks source link

Remove polling queries #1083

Open ipdae opened 2 years ago

ipdae commented 2 years ago

launcher poll some queries for user information (like current block index, monster collection, avatar state). but it may occur overloading headless because call BlockChain.GetState inside query execution.

ipdae commented 2 years ago

here is a list of polling queries I found current head. image

BasixKOR commented 2 years ago

We could try refactoring them into subscriptions. Although it isn't very straight process (I'm guessing here) and requires some changes to the headless we could reuse the WebSocket connection we already have.

BasixKOR commented 2 years ago

I just noticed that the activation query runs just like polling. It essentially uses sleep instead of pollInterval.