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

[release/6.0] Switch to interpreted client-evaluation in parameter extractor #31784

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

roji
Copy link
Member

@roji roji commented Sep 18, 2023

Partial port of #29815
Fixes #31782

Description

As part of EF's LINQ query processing, we identify fragments of the query tree which can be client-evaluated, and evaluate them using a lambda delegate. The lambda is currently compiled rather than interpreted.

Customer impact

On high application load spikes, application memory usage may grow uncontrollably and performance may deteriorate to a point where only a restart is workable.

How found

Customer report on 7.0

Regression

No.

Testing

This is a performance-related change, and so regression testing isn't relevant.

Risk

Extremely small - this simply adds "preferInterpretation: true" to Expression.Lambda<T>.Compile. The lambda in question is only ever invoked once, so this can only help performance (including beyond the spike issue that this issue fixes).

Note that this change was also merged for 8.0.0-preview.1 as part of #29815, and we've received no reports of trouble.

@ajcvickers ajcvickers added this to the 6.0.x milestone Sep 18, 2023
@rbhanda rbhanda modified the milestones: 6.0.x, 6.0.23 Sep 19, 2023
@ajcvickers ajcvickers modified the milestones: 6.0.23, 6.0.24 Oct 4, 2023
@wtgodbe wtgodbe merged commit 28c0abe into dotnet:release/6.0 Oct 4, 2023
7 checks passed
@roji roji deleted the InterpretedLambda branch October 4, 2023 18:30
@ajcvickers ajcvickers removed this from the 6.0.24 milestone Nov 14, 2023
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.

None yet

4 participants