Skip to content

Commit

Permalink
betetr math
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke-Sikina committed Jul 20, 2023
1 parent fd15f0f commit 84146ed
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public void runQuery(Query query, AsyncResult result) {
.map(ColumnMeta::getName)
.collect(Collectors.toList());

int size = Integer.BYTES + columns.size() * 8 * ID_BATCH_SIZE;
int rowWidth = Integer.BYTES + columns.stream().mapToInt(ColumnMeta::getWidthInBytes).sum() * ID_BATCH_SIZE;
int size = rowWidth * ID_BATCH_SIZE;
GenericObjectPool<byte[]> pool = new GenericObjectPool<>(new ByteArrayFactory(size));

Lists.partition(new ArrayList<>(idList), ID_BATCH_SIZE).stream().parallel().forEach((list) -> {
Expand Down

0 comments on commit 84146ed

Please sign in to comment.