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

Validate may not create the actual expressions to be more performant #245

Closed
dadhi opened this issue Mar 18, 2020 · 1 comment
Closed

Validate may not create the actual expressions to be more performant #245

dadhi opened this issue Mar 18, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dadhi
Copy link
Owner

dadhi commented Mar 18, 2020

Related to #133

The only thing we need to know is that the requested service and all its dependencies are resolvable. It is not neccessary to create an actual expression tree of the object graph, therefore it should improve the memory consumption and likely the speed.

@dadhi dadhi added the enhancement New feature or request label Mar 18, 2020
@dadhi dadhi added this to the v5.0.0 milestone Mar 18, 2020
dadhi pushed a commit that referenced this issue Mar 27, 2020
@dadhi
Copy link
Owner Author

dadhi commented Mar 27, 2020

Use the Default expression instead of New or Call expression:

container.Validate(x => x.ServiceType.Name.EndsWith("Controller"));

Validation finished - 00:01:21.60
container.Validate();

Validation finished - 00:02:49.32

@dadhi dadhi modified the milestones: v5.0.0, v4.1.3 Mar 27, 2020
@dadhi dadhi self-assigned this Mar 27, 2020
@dadhi dadhi added this to the v4.1.4 milestone Mar 27, 2020
dadhi added a commit that referenced this issue Mar 27, 2020
@dadhi dadhi closed this as completed Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant