Skip to content

Microsoft.Data.Sqlite: Avoid re-initialization of pooled connections - #28966

Merged
bricelam merged 1 commit into
dotnet:release/7.0from
bricelam:ciphool
Sep 2, 2022
Merged

Microsoft.Data.Sqlite: Avoid re-initialization of pooled connections#28966
bricelam merged 1 commit into
dotnet:release/7.0from
bricelam:ciphool

Conversation

@bricelam

@bricelam bricelam commented Sep 2, 2022

Copy link
Copy Markdown
Contributor

This simple benchmark goes from 5078 ms to 124.

using Dapper;
using Microsoft.Data.Sqlite;

using var connection = new SqliteConnection(
    "Data Source=test.db;Password=Password12!");

connection.Execute(
    "CREATE TABLE IF NOT EXISTS Data(Value)");

for (var i = 0; i < 10; i++)
{
    connection.Execute(
        "INSERT INTO Data VALUES (@Value)",
        new { Value = Random.Shared.Next() });
}

Fixes #28774

@bricelam
bricelam requested a review from a team September 2, 2022 19:13
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.

Slow performance when commiting transaction to SQLite encrypted file

2 participants