Skip to content

Commit d352be1

Browse files
authored
use logical core count for batch size when lazy building dl cache (#19834)
1 parent ee589a6 commit d352be1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chia/data_layer/data_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
unspecified,
6060
)
6161
from chia.util.batches import to_batches
62+
from chia.util.cpu import available_logical_cores
6263
from chia.util.db_wrapper import SQLITE_MAX_VARIABLE_NUMBER, DBWrapper2
6364
from chia.util.log_exceptions import log_exceptions
6465
from chia.util.lru_cache import LRUCache
@@ -299,8 +300,7 @@ async def build_cache_and_collect_missing_hashes(
299300

300301
current_generation = generations[-1] + 1
301302

302-
# TODO: at least shouldn't be hard coded
303-
batch_size = 10
303+
batch_size = available_logical_cores()
304304
generations = range(
305305
current_generation,
306306
min(current_generation + batch_size, root.generation),

0 commit comments

Comments
 (0)