typelevel / skunk

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

Use pipelining to optimize Prepared Commands #1038

Closed vbergeron closed 8 months ago

vbergeron commented 9 months ago

Following ideas in #605, we can reduce the number of message exchanged and speed up some part of the client-server communication.

This PR replace this exchange :

> Bind
> Flush
[expect BindComplete]
< BindComplete
> Execute
> Flush
[expect CommandComplete]
< CommandComplete
> Sync 
[expect ReadyForQuery]

By this one :

> Bind
> Execute
> Flush
[expect BindComplete]
[expect CommandComplete]
< BindComplete
< CommandComplete
> Sync 
[expect ReadyForQuery]