Skip to content

Commit

Permalink
reduce cache sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackrobison committed May 17, 2022
1 parent fa0f132 commit faf46ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scribe/blockchain/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def __init__(self, coin, url, max_workqueue=10, init_retry=0.25,
self._height = None
self.available_rpcs = {}
self.connector = aiohttp.TCPConnector(ssl=False)
self._block_hash_cache = LRUCacheWithMetrics(100000)
self._block_cache = LRUCacheWithMetrics(2 ** 13, metric_name='block', namespace=NAMESPACE)
self._block_hash_cache = LRUCacheWithMetrics(1024)
self._block_cache = LRUCacheWithMetrics(64, metric_name='block', namespace=NAMESPACE)

async def close(self):
if self.connector:
Expand Down
2 changes: 1 addition & 1 deletion scribe/db/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __init__(self, coin, db_dir: str, reorg_limit: int = 200,
self.tx_counts = None
self.headers = None
self.block_hashes = None
self.encoded_headers = LRUCacheWithMetrics(1 << 21, metric_name='encoded_headers', namespace=NAMESPACE)
self.encoded_headers = LRUCacheWithMetrics(1024, metric_name='encoded_headers', namespace=NAMESPACE)
self.last_flush = time.time()

# Header merkle cache
Expand Down

0 comments on commit faf46ea

Please sign in to comment.