Skip to content

Commit

Permalink
Optimise zio.http.Response.fromServerSentEvents
Browse files Browse the repository at this point in the history
Rempve `.map(..).map(..)` chained calls
  • Loading branch information
guizmaii committed Dec 5, 2024
1 parent 1f8ef1f commit 8327451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zio-http/shared/src/main/scala/zio/http/Response.scala
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ object Response {
Response(
Status.Ok,
contentTypeEventStream,
Body.fromCharSequenceStreamChunked(data.map(codec.encode).map(_.asString)),
Body.fromCharSequenceStreamChunked(data.map(codec.encode(_).asString)),
)
}

Expand Down

2 comments on commit 8327451

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 : Performance Benchmarks (PlainTextBenchmarkServer)

concurrency: 256
requests/sec: 348757

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 : Performance Benchmarks (SimpleEffectBenchmarkServer)

concurrency: 256
requests/sec: 345977

Please sign in to comment.