Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.Data.Sqlite: Multi-target .NET Standard 2.1 #24516

Closed
wants to merge 2 commits into from

Conversation

bricelam
Copy link
Contributor

This only matters if you're using SqliteBlob polymorphically as a Stream on older platforms. Everything is functional, you just get the perf/memory characteristics of the API before PR #24503. To illustrate, here's a stack trace:

   at Microsoft.Data.Sqlite.SqliteBlob.Write(ReadOnlySpan`1 buffer)
   at Microsoft.Data.Sqlite.SqliteBlob.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.Stream.Write(ReadOnlySpan`1 buffer)

Platforms where this will matter:

  • .NET Core 2.1-3.1
  • Mono ~6.4+
  • Xamarin.iOS ~12.16+ (< .NET 6)
  • Xamarin.Mac ~5.16+ (< .NET 6)
  • Xamarin.Android ~10.0+ (< .NET 6)

Multi-targeting .NET Standard 2.1 mitigates most of these, but (IMHO) this probably isn't worth it.

@bricelam
Copy link
Contributor Author

bricelam commented Mar 26, 2021

We discussed this as a team and decided that there wasn't enough benefit to warrant adding another target. The workaround is just to cast to SqliteBlob if you really need to reduce memory allocations on these platforms.

@bricelam bricelam closed this Mar 26, 2021
@bricelam bricelam deleted the ns21 branch March 26, 2021 17:51
@roji roji changed the title Microsfot.Data.Sqlite: Multi-target .NET Standard 2.1 Microsoft.Data.Sqlite: Multi-target .NET Standard 2.1 Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant