You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see 2 possible ways to remove this allocation:
a) ArrayPool<byte>.Shared
b) Allocate an array and keep it on bound connection
To limit the potential memory consumption after a big query there can be put a maximum limit for an array length (1mb ?), and in case of hitting it the array is allocated and dropped as it's done right now.
The text was updated successfully, but these errors were encountered:
This doesn't seem to escape the method, so stackalloc? Since the byteCount could be anything, we'd limit to some reasonable limit, and beyond that ArrayPool may be sufficient...
One problem with ArrayPool is that you can't control whenever it's actually going to be purged, so you may get stuck with a huge array for quite a while (see dotnet/runtime#52098, dotnet/runtime#853 and dotnet/runtime#58974 for a few other issues).
efcore/src/Microsoft.Data.Sqlite.Core/SqliteCommand.cs
Line 475 in 9b66f4c
I see 2 possible ways to remove this allocation:
a)
ArrayPool<byte>.Shared
b) Allocate an array and keep it on bound connection
To limit the potential memory consumption after a big query there can be put a maximum limit for an array length (1mb ?), and in case of hitting it the array is allocated and dropped as it's done right now.
The text was updated successfully, but these errors were encountered: