poor SqliteTransaction perf
Open
area-adonet-sqlite
area-perf
consider-for-next-release
customer-reported
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
### Bug description
I'm not a regular sqlite user, but am investigating some perf traces for a component using Microsoft.Data.Sqlite.
I'm seeing ~25% cpu overhead just from recreating/disposing SqliteCommand in Microsoft.Data.Sqlite.SqliteConnectionExtensions.ExecuteNonQuery
Is it possible to cache the `BEGIN;` and `COMMIT;` commands to avoid this overhead?
### Your code
```csharp
using (var transaction = connection.BeginTransaction())
{
transaction.Commit();
}
```
### Stack traces
```text
```
### Microsoft.Data.Sqlite version
8.0.2
### Target framework
8.0
### Operating system
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.