MySqlConnector icon indicating copy to clipboard operation
MySqlConnector copied to clipboard

Pool objects in MySqlDataSource

Open bgrainger opened this issue 2 years ago • 1 comments
trafficstars

MySqlDataSource has methods to create connections and commands. It might be a performance enhancement (from creating less garbage) to pool and reuse these objects.

Disposing a MySqlConnection or MySqlCommand would clear its internal values and return it to the MySqlDataSource.

MySqlConnection.CreateCommand could also pull from the pool if the MySqlConnection were associated with a MySqlDataSource.

It might also be possible to pool MySqlDataReader objects.

bgrainger avatar Dec 23 '22 23:12 bgrainger