typelevel / typelevel/fs2

Make chunk sizes configurable for ProcessBuilder

Open
#3,701 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
2.5k
Forks
636
Avg merge
2d 4h
Merged PRs (30d)
7

Description

The JVM implementation for the stdout and stderr streams for Processes generated by ProcessBuilder.spawn currently use a chunk size of 8192. While this is probably fine for most use cases I've noticed that it can limit throughput drastically when large amounts of data are transferred this way.

It would be helpful, if the chunk size would be a parameter, either of ProcessBuilder or by having a variant of stderr that takes a chunkSize parameter like
def stdout(chunkSize: Int = 8192): Stream[F, Byte]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the JVM implementation of ProcessBuilder.spawn and inspect how stdout and stderr currently read 8192-byte chunks. Check how the existing stdout and stderr APIs are tested, then make the chunk size configurable while preserving the current default of 8192 and verify large transfers use the requested size.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.