fix num read threads

merger-tweak
Mike Barry 2024-01-14 06:13:02 -05:00
rodzic 14bd9946e7
commit a403797875
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -88,7 +88,8 @@ public class TileArchiveWriter {
TileArchiveMetadata tileArchiveMetadata, Path layerStatsPath, PlanetilerConfig config, Stats stats) {
var timer = stats.startStage("archive");
int readThreads = Math.min(config.featureReadThreads(), features.chunksToRead());
int chunksToRead = Math.min(1, features.chunksToRead());
int readThreads = Math.clamp(config.featureReadThreads(), 1, chunksToRead);
int threads = config.threads();
int processThreads = threads < 10 ? threads : threads - readThreads;
int tileWriteThreads = config.tileWriteThreads();