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
Ape is slow right now. We can speed it up by providing a robust caching layer.
Specification
Create first party plugin ape_cache
Create a database schema for types that the new query provider works with (e.g. BlockAPI, TransactionAPI)
Override the QueryAPI.update_cache method in the new query provider plugin to serialize the query results and store them in a cache database on disk (SQLite or Postgres, should be user configurable)
Update the QueryAPI.estimate_query and QueryAPI.perform_query to respond differently if the requested data is already available in the cache db
Explore what database migration commands we might need to service the database over time
Acceptance Criteria
Caching can be turned off/bypassed and is not a part of the critical path
Caching doesn't interrupt the Query Manager
Should always announce if functionality can't be provided
Should only say functionality can be done if it can completely provided
If functionality can be provided, the result should be exactly the same as the default query provider (brute force/default should be the same as cache)
Just leaving a note here, some framework comparisons:
Not quite related to this feature, but yes click is overall a bit slower than what Brownie is using because it comes more "batteries included" out of the box
Eventually, the goal is rewrite a good portion of the library internals as async, and then explore using click's async implementation to help speed things up a lot.
Overview
Ape is slow right now. We can speed it up by providing a robust caching layer.
Specification
ape_cache
BlockAPI
,TransactionAPI
)QueryAPI.update_cache
method in the new query provider plugin to serialize the query results and store them in a cache database on disk (SQLite or Postgres, should be user configurable)QueryAPI.estimate_query
andQueryAPI.perform_query
to respond differently if the requested data is already available in the cache dbAcceptance Criteria
Dependencies
#701
The text was updated successfully, but these errors were encountered: