Skip to content

Commit

Permalink
fix: Increase sync trie cache to 64MB (#1655)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 authored Feb 5, 2024
1 parent a5ed019 commit 05ce5fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/swift-flies-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farcaster/hubble": patch
---

fix: Increase the sync trie cache to 64MB
4 changes: 2 additions & 2 deletions apps/hubble/src/network/sync/merkleTrieWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { TrieNode, TrieSnapshot } from "./trieNode.js";
import { StatsDInitParams, initializeStatsd, statsd } from "../../utils/statsd.js";

// The number of messages to process before unloading the trie from memory
// Approx 25k * 10 nodes * 65 bytes per node = approx 16MB of cached data
const TRIE_UNLOAD_THRESHOLD = 25_000;
// Approx 100k * 10 nodes * 65 bytes per node = approx 64MB of cached data
const TRIE_UNLOAD_THRESHOLD = 100_000;

// We use a proxy to log messages to the main thread
const log = new Proxy<Logger>({} as Logger, {
Expand Down

0 comments on commit 05ce5fe

Please sign in to comment.