perf: Use smaller chunks

This commit is contained in:
sprites0
2025-10-09 08:13:53 +00:00
parent d570cf3e8d
commit 8a179a6d9e

View File

@ -327,8 +327,8 @@ fn migrate_single_static_file<N: HlNodeType>(
) -> Result<(), eyre::Error> { ) -> Result<(), eyre::Error> {
info!("Migrating block range {}...", block_range); info!("Migrating block range {}...", block_range);
// block_ranges into chunks of 100000 blocks // block_ranges into chunks of 10000 blocks
const CHUNK_SIZE: u64 = 100000; const CHUNK_SIZE: u64 = 10000;
for chunk in (0..=block_range.end()).step_by(CHUNK_SIZE as usize) { for chunk in (0..=block_range.end()).step_by(CHUNK_SIZE as usize) {
let end = std::cmp::min(chunk + CHUNK_SIZE - 1, block_range.end()); let end = std::cmp::min(chunk + CHUNK_SIZE - 1, block_range.end());
let block_range = chunk..=end; let block_range = chunk..=end;