-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Add/Attach performance for large graphs (#487)
Makes adding n entities to an EntityCollection or similar roughly O(n) instead of O(n²) * Don't further process entities which are New, Unchanged, Modified since any changes to them would have already been discovered * Calculate and cache AssociationMembers once * Do some code/style cleanup which might also give marginally better perf (calls contains on HashSet instead of Enumerable) and smarter enum checks due to pattern matchning * Always package nuget's so that PR artifacts can be tested * minor EntitySet perf improvements * Use result of HashSet.Add instead of checking Contains before Add * Make ListCollectionViewProxy smarter * remove IndexOf from Add for O(1) instead of O(n) performance * Contains use hashSet contains instead of IndeOf for O(1) instead of O(n) performance * Remove argument range check * EntitySet Make _set and _identityCache fields readonly
- Loading branch information
1 parent
0f00bbd
commit 069a03f
Showing
5 changed files
with
149 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.