npgsql/npgsql — pull request #374 by roji (2014-10-09 15:20:10+00:00)
Title: Reduce allocations by remove client message classes

Previously, sending a message to the backend involved instantiating a class, and calling its WriteToStream() method; the instance would then be thrown away. This caused needless instantiations for a great deal of messages, and made the workflow more complicated than it needed to be.

Moved the actual wire-writing code to NpgsqlConnector, reduced the allocations happening along the flow.

Note that this PR is based off the async work branch in #121, only the last 3 commits are relevant.