mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-06-14 08:29:31 +08:00
feat: attempt to scale up multithreading
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user