Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Removed flushing during arrow IPC writing to improve performance when…
Browse files Browse the repository at this point in the history
… using a buffered writer (#1318)
  • Loading branch information
cyr committed Dec 6, 2022
1 parent 1fa497f commit fc212a0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/io/ipc/write/common_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ pub async fn write_continuation<W: AsyncWrite + Unpin + Send>(
) -> Result<usize> {
writer.write_all(&CONTINUATION_MARKER).await?;
writer.write_all(&total_len.to_le_bytes()[..]).await?;
writer.flush().await?;
Ok(8)
}

Expand All @@ -66,6 +65,5 @@ async fn write_body_buffers<W: AsyncWrite + Unpin + Send>(
writer.write_all(&vec![0u8; pad_len][..]).await?;
}

writer.flush().await?;
Ok(total_len)
}
2 changes: 0 additions & 2 deletions src/io/ipc/write/common_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ fn write_body_buffers<W: Write>(mut writer: W, data: &[u8]) -> Result<usize> {
writer.write_all(&vec![0u8; pad_len][..])?;
}

writer.flush()?;
Ok(total_len)
}

Expand All @@ -56,6 +55,5 @@ fn write_body_buffers<W: Write>(mut writer: W, data: &[u8]) -> Result<usize> {
pub fn write_continuation<W: Write>(writer: &mut W, total_len: i32) -> Result<usize> {
writer.write_all(&CONTINUATION_MARKER)?;
writer.write_all(&total_len.to_le_bytes()[..])?;
writer.flush()?;
Ok(8)
}

0 comments on commit fc212a0

Please sign in to comment.