Skip to content

Commit

Permalink
feat: increase buffers
Browse files Browse the repository at this point in the history
Sets decoded buffer to a multiple of concurrent put limit. Sets
concurrent put to a reasonable runtime default.
  • Loading branch information
alextes committed Oct 15, 2023
1 parent c185b06 commit 88c9065
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/migrate-from-gcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ async fn main() -> anyhow::Result<()> {
let payload_stream = gcs.get(&object_meta.location).await?.into_stream();
let reader = StreamReader::new(payload_stream);

const DECODED_BUFFER_SIZE: usize = 32;
const DECODED_BUFFER_SIZE: usize = 128;
let (mut decoded_tx, decoded_rx) = channel(DECODED_BUFFER_SIZE);

let handle = spawn_blocking(move || {
Expand Down Expand Up @@ -226,7 +226,7 @@ async fn main() -> anyhow::Result<()> {
}
});

const CONCURRENT_PUT_LIMIT: usize = 1;
const CONCURRENT_PUT_LIMIT: usize = 32;

// Skip payloads that have already been processed.
decoded_rx
Expand Down

0 comments on commit 88c9065

Please sign in to comment.