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

Stop registering ICollectionTypeFactory in D.I. #6616

Closed
ajcvickers opened this issue Sep 27, 2016 · 0 comments
Closed

Stop registering ICollectionTypeFactory in D.I. #6616

ajcvickers opened this issue Sep 27, 2016 · 0 comments
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@ajcvickers
Copy link
Contributor

Since it is no longer resolved from D.I.

ajcvickers referenced this issue Sep 27, 2016
This is because the dictionary access involved in looking up the delegates is a significant perf hit, and co-location of the accessors with the property/navigation for which they are used removes this overhead.

Since he model is not coupled to the service provider, this means that the delegate construction code is now not a replaceable service. The mitigation for this in the long term is to allow extensibility of the model to contain delegates created in different ways. For example, the factories used to create the delegates could be annotated onto the model.

Note that the delegates are not stored as annotations because the lazy creation needs to happen after the model is "built" and must be thread-safe, neither of which are supported by annotations. Also, this is pert-sensitive code and the lookup needs to be fast.
@rowanmiller rowanmiller added this to the 1.1.0-preview1 milestone Oct 3, 2016
ajcvickers added a commit that referenced this issue Oct 3, 2016
This used to be a D.I. resolved service in pre-release versions of EF Core. The CollectionTypeFactory is now directly instantiated, so removing this interface.

Issue #6616
ajcvickers added a commit that referenced this issue Oct 3, 2016
This used to be a D.I. resolved service in pre-release versions of EF Core. The CollectionTypeFactory is now directly instantiated, so removing this interface.

Issue #6616
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 3, 2016
@ajcvickers ajcvickers modified the milestones: 1.1.0-preview1, 1.1.0 Oct 15, 2022
@ajcvickers ajcvickers removed their assignment Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

2 participants