OpenRIAServices / OpenRiaServices

The Open RIA Services project continues what was previously known as WCF RIA Services.
https://openriaservices.gitbook.io/openriaservices/
Apache License 2.0
54 stars 47 forks source link

EntiryRef Perf: Avoid Enumerable.OfType() #491

Closed Daniel-Svensson closed 4 months ago

Daniel-Svensson commented 4 months ago

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.

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud