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

Missing enumerable reducing before caching causes major performance degradation #2122

Closed
nsarris opened this issue Jul 6, 2021 · 1 comment
Assignees
Milestone

Comments

@nsarris
Copy link

nsarris commented Jul 6, 2021

navigationBindingList = this.NavigationPropertyBindings.Where(targetMapping => targetMapping.NavigationProperty == navigationProperty);

An attempt to improve performance was commited in the last version by caching FindNavigationPropertyBindings.FindNavigationPropertyBindings. Unfortunately instead of caching the materialized list of results the enumerable was cached resulting in even more performance degradation.

This fix is to simple add .ToList() on the enumerable.

@habbes
Copy link
Contributor

habbes commented Jul 7, 2021

Thanks @nsarris for reporting this. We'll look into this and patch it (cc @Sreejithpin )

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

No branches or pull requests

4 participants