Skip to content
0:00 / 0:00

#efcore#sqlclient#async

Navigating Async Challenges in EF Core for Large Data Retrieval

dotnet

357K subscribers • 45 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Made by the vendor. The company whose product it covers made or sponsored it.

Advanced. Deep dive for people who know the field.

3.6K views1 year ago1 recommendation

Databases and dataSystems programmingDatabase internalsPerformance and optimizationConcurrency and parallelism

An explanation of why asynchronous methods in EF Core can suffer from performance degradation when retrieving large datasets.

This talk will address a common yet critical issue faced by developers using EF Core (including EF Core 9.0) to read large datasets asynchronously. Despite the promise of scalability with async programming, many encounter performance degradation, timeouts, or incomplete data reads when using methods like ToListAsync and FirstOrDefaultAsync in EF Core. We'll examine the underlying SqlClient library and its internal class, TdsParserStateObject, to understand how it handles asynchronous operations and why it struggles with large data reads. Attendees will gain insights into EF Core's async behavior, potential workarounds, and strategies to optimize performance when working with large datasets. Connect with .NET: Blog: aka.ms/dotnet/blog Twitter: aka.ms/dotnet/twitter TikTok: aka.ms/dotnet/tiktok Mastodon: aka.ms/dotnet/mastodon LinkedIn: aka.ms/dotnet/linkedin Facebook: aka.ms/dotnet/facebook Docs: learn.microsoft.com/dotnet Forums: aka.ms/dotnet/forums 🙋‍♀️Q&A: aka.ms/dotnet-qa 👨‍🎓Microsoft Learn: aka.ms/learndotnet #dotnet

Why it's here

1 person recommends this

What people say. Recommended for understanding performance issues and bugs with EF Core async methods on large datasets.

u/DemoBytomin r/dotnet • Recommends

On “Should I use EF core async methods?”

…r `varbinary(MAX)` the async methods are much, much slower than the sync version. This bug is being worked on, and some fixes have already been made and merged into newer version of SqlClient library. You can read on it here: https://github.com/dotnet/SqlClient/issues/593#issuecomment-2506773562 and there was a talk about it on the last .NET Conf: link to this video The SQL Client library has a set lifetime (like the .NET for example) and the `5.1.x` version is a LTS (long term support) version: https://learn.microsoft.com/en-us/sql/connect/ado-net/sqlclient-driver-support-lifecycle?view=sql-server-ver16 This version is the one that EF Core has as a minimum dependency - meaning this version is downlo…