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

Bug: Async fetch operations are not using the DbDataReader.ReadAsync method (in v1.12.0 to v1.12.2) #601

Closed
mikependon opened this issue Sep 28, 2020 · 7 comments
Assignees
Labels
bug Something isn't working deployed Feature or bug is deployed at the current release priority Top priority feature or things to do todo Things to be done in the future

Comments

@mikependon
Copy link
Owner

Affected by the latest release and core compiler updates, the current fetch operations are not using the DbDataReader.ReadAsync() operations. All the Async fetch operations (i.e.: BatchQueryAsync, QueryAsync and ExecuteQueryAsync) are using this sync method.

@mikependon mikependon added bug Something isn't working todo Things to be done in the future priority Top priority feature or things to do labels Sep 28, 2020
@mikependon mikependon self-assigned this Sep 28, 2020
@mikependon
Copy link
Owner Author

We are aware of this and is currently working on the solution. This will be a part of the next release.

mikependon added a commit that referenced this issue Sep 28, 2020
@mikependon mikependon pinned this issue Sep 28, 2020
@mikependon mikependon added the deployed Feature or bug is deployed at the current release label Sep 29, 2020
@mikependon mikependon unpinned this issue Sep 29, 2020
@mikependon mikependon removed the deployed Feature or bug is deployed at the current release label Sep 29, 2020
@mikependon
Copy link
Owner Author

The fix is now deployed and is available at RepoDb v1.12.3.

@mikependon mikependon added the deployed Feature or bug is deployed at the current release label Sep 29, 2020
@BieleckiLtd
Copy link
Contributor

Hi. I was looking to fill similar ticket but since you were faster I will ask question part of my issue :) I am looking at private static async Task<IEnumerable<TResult>> ExecuteQueryAsyncInternalForType<TResult> and can't figure out what is the purpose of AsList() in var result = (await DataReader.ToEnumerableAsync<TResult>(reader, dbFields, connection.GetDbSetting())).AsList(); Because of this you later have to do casting (IEnumerable<TResult>)result which otherwise could be avoided I'd guess.

@mikependon
Copy link
Owner Author

You are correct, this is a valid question to the ToEnumerableAsync() method as the resultset is actually a List<TResult>, we are not using IAsyncEnumerable<TResult> there (meaning, no yielding). However, the AsList() is casting it back to the correct type, and no conversion is happening. The impact is very minimal. I hope you that explained.

@BieleckiLtd
Copy link
Contributor

Yeah, ok, thanks. I think I was associating degraded async performance of larger data sets with that casting and type conversions, but after I updated to 1.12.3 it's returning my data blazing fast nonetheless.

@mikependon
Copy link
Owner Author

Remember, there is no conversion there. It is only casting it, but to make it perfect, you are correct that the mentioned AsList() call is not necesarry. I am happy if you could PR that :)

BieleckiLtd added a commit to BieleckiLtd/RepoDB that referenced this issue Sep 29, 2020
mikependon added a commit that referenced this issue Sep 30, 2020
Addition to #601 - removed redundant type casting
@mikependon
Copy link
Owner Author

This has been fixed and is now available at RepoDb v1.12.3. Closing this incident ticket now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deployed Feature or bug is deployed at the current release priority Top priority feature or things to do todo Things to be done in the future
Projects
None yet
Development

No branches or pull requests

2 participants