typelevel / skunk

A data access library for Scala + Postgres.
https://typelevel.org/skunk/
MIT License
1.59k stars 163 forks source link

TCP Pipelining: Optimize Bind+Execute message flow #1061

Closed vbergeron closed 8 months ago

vbergeron commented 8 months ago

Another pipelining optim query, this time on the Command bind + execute combo.

Expect a good performance bump when using short-lived command or queries

Commands Before : Bind -> Flush -> await BindComplete -> Execute -> Flush -> await CommandComplete After : Bind -> Execute -> Flush -> await BindComplete -> await CommandComplete

Queries with a fixed known size (unique, option, stream) Before

After:

Queries with an unknown size (cursors) No changes

codecov-commenter commented 8 months ago

Codecov Report

Attention: Patch coverage is 64.28571% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 83.82%. Comparing base (493eeed) to head (fa9f282).

Files Patch % Lines
...ared/src/main/scala/net/protocol/BindExecute.scala 60.00% 10 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1061 +/- ## ========================================== - Coverage 84.12% 83.82% -0.31% ========================================== Files 137 138 +1 Lines 2098 2120 +22 Branches 230 248 +18 ========================================== + Hits 1765 1777 +12 - Misses 333 343 +10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.