Skip to content

Commit

Permalink
chore: creates smaller blocks batches (#337)
Browse files Browse the repository at this point in the history
this allows us to do smaller quries and less time waiting PG
3x faster this way
  • Loading branch information
renancloudwalk authored Mar 11, 2024
1 parent 4540dd7 commit 26dec16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bin/importer_offline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ use tokio::sync::mpsc;
use tokio_util::sync::CancellationToken;

/// Number of blocks fetched in each query.
const BLOCKS_BY_FETCH: usize = 50_000;
const BLOCKS_BY_FETCH: usize = 10_000;

/// Number of tasks in the backlog.
///
/// Each task contains 50_000 blocks and all receipts for them.
const BACKLOG_SIZE: usize = 10;
/// Each task contains 10_000 blocks and all receipts for them.
const BACKLOG_SIZE: usize = 50;

type BacklogTask = (Vec<BlockRow>, Vec<ReceiptRow>);

Expand Down

0 comments on commit 26dec16

Please sign in to comment.