-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
It seems fetching subnetkeys in agent-js is indeed cached but this cache is not shared yet when making multiple query calls in parallel.
Maybe the cache could contain Promise instead of SubnetKey so multiple query calls in parallel only need a single read_state request?
For the average dev, having it re-use the same request when making the first queries in parallel would be nice improvement.
For whomever comes across this issue, you can explicitly pre-cache the subnet keys by calling
agent.fetchSubnetKeys()on page load, this avoids the need for them to be fetched on the first query triggered by a user interaction.
ilbertt
Metadata
Metadata
Assignees
Labels
No labels