mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-31 20:53:06 -07:00
computer: reduce even more the number of par threads for compute_rest_part2
This commit is contained in:
@@ -598,7 +598,6 @@ impl Stores {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn rotate_memtables(&self) {
|
pub fn rotate_memtables(&self) {
|
||||||
info!("Rotatin memtables...");
|
|
||||||
self.as_slice()
|
self.as_slice()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.for_each(|store| store.rotate_memtable());
|
.for_each(|store| store.rotate_memtable());
|
||||||
|
|||||||
@@ -1301,7 +1301,7 @@ impl Vecs {
|
|||||||
.collect::<Vec<Either<&mut utxo_cohort::Vecs, &mut address_cohort::Vecs>>>();
|
.collect::<Vec<Either<&mut utxo_cohort::Vecs, &mut address_cohort::Vecs>>>();
|
||||||
|
|
||||||
// Capped as external drives (even thunderbolt 4 SSDs) can be overwhelmed
|
// Capped as external drives (even thunderbolt 4 SSDs) can be overwhelmed
|
||||||
let chunk_size = (vecs.len() as f64 / 4.0).ceil() as usize;
|
let chunk_size = (vecs.len() as f64 / 3.0).ceil() as usize;
|
||||||
vecs.into_par_iter().chunks(chunk_size).try_for_each(|v| {
|
vecs.into_par_iter().chunks(chunk_size).try_for_each(|v| {
|
||||||
v.into_iter().try_for_each(|either| match either {
|
v.into_iter().try_for_each(|either| match either {
|
||||||
Either::Left(v) => v.compute_rest_part2(
|
Either::Left(v) => v.compute_rest_part2(
|
||||||
@@ -1331,7 +1331,6 @@ impl Vecs {
|
|||||||
})
|
})
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
info!("Computing rest part 2 (others)...");
|
|
||||||
self.indexes_to_unspendable_supply.compute_rest(
|
self.indexes_to_unspendable_supply.compute_rest(
|
||||||
indexer,
|
indexer,
|
||||||
indexes,
|
indexes,
|
||||||
|
|||||||
Reference in New Issue
Block a user