Memory efficiency of scalaz-stream

57 views Asked by At

Let's consider the first example from the README in its github page:

val converter: Task[Unit] =
  io.linesR("testdata/fahrenheit.txt")
    .filter(s => !s.trim.isEmpty && !s.startsWith("//"))
    .map(line => fahrenheitToCelsius(line.toDouble).toString)
    .intersperse("\n")
    .pipe(text.utf8Encode)
    .to(io.fileChunkW("testdata/celsius.txt"))
    .run

How efficient will it be in terms of memory usage? Will it buffer the whole content in memory at each step before passing the result to the next? Or will it be done in a streaming way, meaning it will have constant memory usage?

Moreover, is scalaz-stream a high-quality library that we can consider for use in production settings?

0

There are 0 answers