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

EntiryRef Perf: Avoid Enumerable.OfType() #491

Merged

Conversation

Daniel-Svensson
Copy link
Member

@Daniel-Svensson Daniel-Svensson commented Feb 13, 2024

Skip OfType() in EntityRef.GetSingleMatch if possible

Remove type check and cast when looking up an entityref.

When the target collection have thousands of entities the oftype enumerable was responsible for almost 2/3 of lookup cost.

This should give a little better perf until #6 is implemented.

Copy link

@Daniel-Svensson Daniel-Svensson changed the title Skip OfType in EntityRef.GetSingleMatch if possible EntiryRef PERF: Avoid Enumerable.OfType() Feb 14, 2024
@Daniel-Svensson Daniel-Svensson changed the title EntiryRef PERF: Avoid Enumerable.OfType() EntiryRef Perf: Avoid Enumerable.OfType() Feb 14, 2024
@Daniel-Svensson Daniel-Svensson merged commit e89b39f into OpenRIAServices:main Feb 14, 2024
6 checks passed
@Daniel-Svensson Daniel-Svensson deleted the entityref_perf branch February 14, 2024 09:28
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.

1 participant