-
Notifications
You must be signed in to change notification settings - Fork 116
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
Caching network calls for RPC returning immutable data #924
Comments
taquito-http-utils.ts We have an ongoing discussion in Taquito where we want to improve dApps performance by reducing the number of calls that Taquito makes to the RPC. What I am looking for first is some metrics on the current state so we can see how we improve it. I first discussed with Michael about using a custom RpcClient, but I think it would be better to use a custom HttpBackend instead. The HttpBackend is the class that provides http functionality for Taquito. The idea is to implement a new HttpBackend class (almost the same as the current one, but it can include a map where the key is an url and the value a number representing how many time the url is called). Thus, this custom httpBackend can be injected in the TezosToolkit instantiated in the config file of the integration test: https://github.com/ecadlabs/taquito/blob/master/integration-tests/config.ts#L277 and assertions on the number of calls could be added to the different tests. |
a branch with tests instrumented to count RPC calls has been made. The results are being used to design the caching for RPC calls. mk-924-caching-for-RPC |
* Added RpcClientInterface * Implement an RpcClientCache class
Is your feature request related to a problem and use case? Please describe.
Description from AndreasGassmann:
Describe the solution you'd like
Implement a cache on the RpcClient or HttpBackend class.
Records the number of calls made to each endpoint on our integration tests before and after adding the cache to measure improvement.
Immutable data caching would be a great point to start.
We want to access RPCs that would fit into this category. Examples are script, entrypoint, etc.
Then we will look at other call and can categorize further.
The text was updated successfully, but these errors were encountered: