This is an automated email from the ASF dual-hosted git repository.
bchapuis pushed a commit to branch mbtiles-perf
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
The following commit(s) were added to refs/heads/mbtiles-perf by this push:
new 92d464dd Improve export settings
92d464dd is described below
commit 92d464ddf825ad8e13b2a6ef249cea742fe24480
Author: Bertil Chapuis <[email protected]>
AuthorDate: Tue Aug 22 20:50:04 2023 +0200
Improve export settings
---
.../src/main/java/org/apache/baremaps/utils/PostgresUtils.java | 2 +-
.../java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git
a/baremaps-core/src/main/java/org/apache/baremaps/utils/PostgresUtils.java
b/baremaps-core/src/main/java/org/apache/baremaps/utils/PostgresUtils.java
index ab5cf6e3..5c6bf210 100644
--- a/baremaps-core/src/main/java/org/apache/baremaps/utils/PostgresUtils.java
+++ b/baremaps-core/src/main/java/org/apache/baremaps/utils/PostgresUtils.java
@@ -44,7 +44,7 @@ public final class PostgresUtils {
* @return the data source
*/
public static HikariDataSource createDataSource(String url) {
- return createDataSource(url, Runtime.getRuntime().availableProcessors());
+ return createDataSource(url, Runtime.getRuntime().availableProcessors() *
2);
}
/**
diff --git
a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java
b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java
index 8b5f5a84..5bced5a8 100644
---
a/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java
+++
b/baremaps-core/src/main/java/org/apache/baremaps/workflow/tasks/ExportVectorTiles.java
@@ -74,8 +74,7 @@ public record ExportVectorTiles(
StreamUtils.stream(TileCoord.iterator(envelope, tileset.getMinzoom(),
tileset.getMaxzoom()))
.peek(new ProgressLogger<>(count, 5000));
- StreamUtils.batch(stream, Runtime.getRuntime().availableProcessors() * 2)
- .forEach(new TileChannel(sourceTileStore, targetTileStore));
+ StreamUtils.batch(stream).forEach(new TileChannel(sourceTileStore,
targetTileStore));
}
private TileStore sourceTileStore(Tileset tileset, DataSource datasource) {