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

Improve EntityRef performance for large EntitySets #6

Open
Daniel-Svensson opened this issue Jan 2, 2018 · 3 comments
Open

Improve EntityRef performance for large EntitySets #6

Daniel-Svensson opened this issue Jan 2, 2018 · 3 comments

Comments

@Daniel-Svensson
Copy link
Member

Daniel-Svensson commented Jan 2, 2018

When lots of rows are in-memory, calculating foreign key relationships can become very slow. Adding indexes to the EntitySet would greatly help performance in those situations.

This work item was migrated from CodePlex

CodePlex work item ID: '6'
Vote count: '3'

@Daniel-Svensson
Copy link
Member Author

[danneesset@2013-11-03]
It looks like the EntitySets already have an internal dictionary for looking up entities which should provide usable.

EntitySet currently have a method " internal Entity GetEntityByKey(object[] keyValues)" which can be used to retreive an entity given it's key. Internally all entitites seems to be stored by key in a variable called "_identityCache".

It should be quite easy to use this functionallity for foreign key relationships, but I think it would also be of use if there was a public API for this.

@Daniel-Svensson

This comment has been minimized.

@Daniel-Svensson Daniel-Svensson changed the title Indexed EntitySet Improve EntityRef performance for large EntitySets Jun 17, 2018
@Daniel-Svensson
Copy link
Member Author

For the scenario of childen having to find their parent there is an old draft of a solution in https://github.com/Daniel-Svensson/OpenRiaServices/tree/feature/entity_ref

The code generation must probably be updated to use the entity ref

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

1 participant