You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/06/02 13:25:32 UTC

[avro] 03/04: Use a block size that is pow2

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch rust-improve-cpu-and-memory-usage
in repository https://gitbox.apache.org/repos/asf/avro.git

commit 1ed1d784c5c5b0068cf4f1324e58f654765e6572
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Thu Jun 2 16:23:39 2022 +0300

    Use a block size that is pow2
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 lang/rust/avro/src/writer.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lang/rust/avro/src/writer.rs b/lang/rust/avro/src/writer.rs
index 18eb833c0..6e370cf41 100644
--- a/lang/rust/avro/src/writer.rs
+++ b/lang/rust/avro/src/writer.rs
@@ -28,7 +28,7 @@ use rand::random;
 use serde::Serialize;
 use std::{collections::HashMap, convert::TryFrom, io::Write, marker::PhantomData};
 
-const DEFAULT_BLOCK_SIZE: usize = 16000;
+const DEFAULT_BLOCK_SIZE: usize = 16 * 1024;
 const AVRO_OBJECT_HEADER: &[u8] = b"Obj\x01";
 
 /// Main interface for writing Avro formatted values.