FSharp.Data.SqlClient icon indicating copy to clipboard operation
FSharp.Data.SqlClient copied to clipboard

.NET 4.5 optimized version

Open dmitry-a-morozov opened this issue 12 years ago • 4 comments

The .NET 4.5 specific version can leverage BCL built-it support for async ops (ExecuteNonQueryAsync, ExecuteReaderAsync) including not available on .NET 4 connection.OpenAsync(). Also sqlDataReader.ReadAsync() (issue #15)

dmitry-a-morozov avatar Oct 26 '13 20:10 dmitry-a-morozov

How do you envision this? Do we need 4.0 compat, or can it be abandoned? .Net 4.5 doesn't support Windows XP, but other than that, I can't think of a reason to bother with keeping a 4.0 version around.

On a side note, I've always wondered about SqlDataReader.ReadAsync, the overhead of asyncing it must be massive? I've never tried it, but I would think it is too fine-grained? Will have to benchmark that some time.

rojepp avatar Nov 27 '13 23:11 rojepp

I think .NET 4.5 adoption is not wide enough to abandon ver 4.0 completely.
I have exactly same thoughts about SqlDataReader.ReadAsync - overhead of one-row retrieval should be big enough to compensate async. @tpetricek mentioned once that @ptrelford had real use case in production code where he needed per-row async. For now let's just the issue open.

dmitry-a-morozov avatar Nov 30 '13 00:11 dmitry-a-morozov

Maybe it's OK, if .NET 4.5 version of FSharp.Data.SqlClient will have some additional functionality..

koistya avatar Jun 07 '14 20:06 koistya

Some features like issue #15 can be implemented only on .NET 4.5. Opening connection asynchronously too. Also, because we might see some performance improvements on 4.5 because built-in async task-based ops can have better in-lining. Exception handling story for async operations is better on 4.5 All above either advance or not pressing issues. I would like to see at least one user request before we'll think implementing those.

dmitry-a-morozov avatar Jun 08 '14 23:06 dmitry-a-morozov