Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove MakeGenericMethod from the query hot path #27437

Open
Tracked by #24903 ...
roji opened this issue Feb 14, 2022 · 1 comment
Open
Tracked by #24903 ...

Remove MakeGenericMethod from the query hot path #27437

roji opened this issue Feb 14, 2022 · 1 comment

Comments

@roji
Copy link
Member

roji commented Feb 14, 2022

When calling terminating operators such as Single, Average, we currently call MakeGenericMethod, which is slow; when running a basic tracking query + update against InMemory, this (and the related GetGenericArguments) take up around 0.6% of the running time with Npgsql, around 6% with InMemory.

We could probably follow the runtime's pattern to get rid of this.

@ranma42
Copy link
Contributor

ranma42 commented Jul 13, 2024

The links are now outdated.
The EFCore link is

: operatorMethodInfo.MakeGenericMethod(typeof(TSource));

The runtime link is https://github.com/dotnet/runtime/blob/215b39abf947da7a40b0cb137eab4bceb24ad3e3/src/libraries/System.Linq.Queryable/src/System/Linq/Queryable.cs#L772

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

No branches or pull requests

4 participants