You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, 2 getProgramAccounts RPC requests are made to a Solana RPC server on startup, first to cache the USDC markets, then the SOL markets. They are very slow, and can timeout, causing startup to fail.
Fix
Add multi-threading to the 2 RPC calls, so they are made concurrently. CompleteableFuture may be preferred, or the most modern Java concurrency pattern that is elegant.
If RPC timeout is experienced during either of the threads, retry up to 3 times.
The text was updated successfully, but these errors were encountered:
Retry doesn't seem needed anymore, now that the majority of the Solana network is on 1.10.25, and both markets cache in ~1-3 seconds with the threading.
Abstract
As of now, 2
getProgramAccounts
RPC requests are made to a Solana RPC server on startup, first to cache the USDC markets, then the SOL markets. They are very slow, and can timeout, causing startup to fail.Fix
CompleteableFuture
may be preferred, or the most modern Java concurrency pattern that is elegant.The text was updated successfully, but these errors were encountered: