-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: Make GetBytes, GetChars, and GetTextReader more efficient #13987
Comments
Also look into using |
Note, SQLitePCL.raw assumes strings are always encoded using UTF-8. We can too. |
I would like to work on this task. any guide PLZ |
Work is described above:
|
Hi @bricelam |
The MemoryStreams look unnecessary. Also, use StreamReader instead of Encoding.GetString(). Feel free to send a PR. We can iterate on the implementation there. |
Hi @bricelam |
Hi @bricelam
Unless we should apply something similar at this line: Also And the whole reader is disposed at
Is the method |
I reverted the fix for this since it is causing intermittent seg fault on Linux in Microsoft.Data.Sqlite.Tests. |
I’ll dig into these. May have exposed an existing issue with SqliteBlob. |
|
We're probably leaking sqlite_blob objects and the SQLite GC ends up freeing them before the .NET GC. 💥 |
SqliteDataReader.GetBytes(), GetChars(), and GetTextReader() should leverage SqliteBlob. We should also update GetStream() to cache the rowid ordinal and value as part of this change. (Don't forget to invalidate them in Read and NextResult.)
The text was updated successfully, but these errors were encountered: