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

Add Caching to SqliteDataRecord for Ordinal and Name #24141

Merged
merged 2 commits into from
Mar 12, 2021

Conversation

Strepto
Copy link
Contributor

@Strepto Strepto commented Feb 12, 2021

Add Ordinal and Name Caching to SqliteDataRecord

This speeds up repeated ordinal and Name access, while having probable negligible effect on existing queries to GetName(int) or GetOrdinal(string).

Fixes #24140

This is my first PR, please guide me if there is anything I must do to improve the submission 👍

@dnfadmin
Copy link

dnfadmin commented Feb 12, 2021

CLA assistant check
All CLA requirements met.

Strepto and others added 2 commits March 12, 2021 13:54
This speeds up repeated ordinal and Name access. Example existing usage could be from SqlDataReaderExtension.GetValueOrDefault or similar.

Related to dotnet#24140
@bricelam bricelam force-pushed the SqliteOrdinalCache branch from d2c4747 to ed2b50d Compare March 12, 2021 22:09
@bricelam bricelam merged commit ed2b50d into dotnet:main Mar 12, 2021
@bricelam
Copy link
Contributor

Thanks! This change should ship in 6.0.0-preview.3 sometime next month.

@Saibamen
Copy link

Nice. Do you have some before and after benchmark speed measurements?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Caching to Microsoft.Sqlite GetOrdinal
5 participants