feat: attempt to scale up multithreading

This commit is contained in:
Ludo Galabru
2023-08-01 08:44:13 +02:00
parent ddb329cf2b
commit be91202d6b
2 changed files with 5 additions and 3 deletions

View File

@@ -1190,10 +1190,12 @@ pub fn retrieve_inscribed_satoshi_points_from_block_v3(
let expected_traversals = transactions_ids.len() + l1_cache_hits.len();
let (traversal_tx, traversal_rx) = channel();
let traversal_data_pool = ThreadPool::new(hord_config.ingestion_thread_max);
let thread_max = hord_config.ingestion_thread_max * 3;
let traversal_data_pool = ThreadPool::new(thread_max);
let mut tx_thread_pool = vec![];
for thread_index in 0..hord_config.ingestion_thread_max {
for thread_index in 0..thread_max {
let (tx, rx) = channel();
tx_thread_pool.push(tx);

View File

@@ -126,7 +126,7 @@ impl Service {
while let Some((start_block, end_block)) = should_sync_hord_db(&self.config, &self.ctx)?
{
let end_block = end_block.min(start_block + 512);
let end_block = end_block.min(start_block + 256);
info!(
self.ctx.expect_logger(),
"Indexing inscriptions from block #{start_block} to block #{end_block}"