rust-postgres/tokio-postgres/src
Steven Fackler 2d2a5dea81 Send response messages in blocks
Our codec implementation originally just parsed single messages out of
the stream buffer. However, if a query returns a bunch of rows, we're
spending a ton of time shipping those individual messages from the
connection back to the Query stream. Instead, collect blocks of unparsed
messages that are as large as possible and send those back.

This cuts the processing time of the following query in half, from ~10
seconds to ~5:
`SELECT s.n, 'name' || s.n FROM generate_series(0, 9999999) AS s(n)`

At this point, almost all of the remainder of the time is spent parsing
the rows.

cc #450
2019-06-27 21:47:13 -07:00
..
error Include the parameter/column index in type conversion errors 2019-05-20 19:05:54 -07:00
proto Send response messages in blocks 2019-06-27 21:47:13 -07:00
types Fix new clippy warnings 2019-04-11 19:51:42 -07:00
config.rs Fix new clippy warnings 2019-04-11 19:51:42 -07:00
impls.rs Avoid copies in copy_in 2019-06-25 18:54:17 -07:00
lib.rs Avoid copies in copy_in 2019-06-25 18:54:17 -07:00
row.rs Include the parameter/column index in type conversion errors 2019-05-20 19:05:54 -07:00
socket.rs Finish docs for tokio-postgres 2019-03-04 21:22:50 -08:00
stmt.rs Make internal simple query future a stream 2018-12-27 13:51:39 -05:00
tls.rs Fix serde docs 2019-03-04 21:51:44 -08:00