Skip to content

Commit be91202

Browse files
author
Ludo Galabru
committed
feat: attempt to scale up multithreading
1 parent ddb329c commit be91202

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

components/hord-cli/src/hord/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1190,10 +1190,12 @@ pub fn retrieve_inscribed_satoshi_points_from_block_v3(
11901190
let expected_traversals = transactions_ids.len() + l1_cache_hits.len();
11911191
let (traversal_tx, traversal_rx) = channel();
11921192

1193-
let traversal_data_pool = ThreadPool::new(hord_config.ingestion_thread_max);
1193+
let thread_max = hord_config.ingestion_thread_max * 3;
1194+
1195+
let traversal_data_pool = ThreadPool::new(thread_max);
11941196
let mut tx_thread_pool = vec![];
11951197

1196-
for thread_index in 0..hord_config.ingestion_thread_max {
1198+
for thread_index in 0..thread_max {
11971199
let (tx, rx) = channel();
11981200
tx_thread_pool.push(tx);
11991201

components/hord-cli/src/service/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ impl Service {
126126

127127
while let Some((start_block, end_block)) = should_sync_hord_db(&self.config, &self.ctx)?
128128
{
129-
let end_block = end_block.min(start_block + 512);
129+
let end_block = end_block.min(start_block + 256);
130130
info!(
131131
self.ctx.expect_logger(),
132132
"Indexing inscriptions from block #{start_block} to block #{end_block}"

0 commit comments

Comments
 (0)