-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement lazy loading of initial storage values #41
Comments
darkfriend77
pushed a commit
that referenced
this issue
Sep 29, 2022
* Cleanups and Renamings * Documentation Additions * Documentation Improvements * Added IsLazyLoadingEnabled * Property initialization for Typed and TypedMapStorage * Storage Lazy Loading Implementation * Update Startup.cs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, we load all storages with their initial values during the Service Layer Startup using the
GetPairs
RPC method that is unsafe to be called externally.A solution would be to replace
GetPairs
withGetKeysPaged
.to get all keys and thenGetStorageAsync
for each value (as tried in #36). But even if we did that, the time needed in order initially load all storages would be significantly long. TheGetKeysPaged
method alone is throttled to one request per second on Kusama.Therefore, as a first step, we will allow the lazy loading of the storage values, meaning, we will add a flag/setting that allows to deactivate the initial storage key/value loading.
The text was updated successfully, but these errors were encountered: