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

Create parallel data structure for types to fasten up lookups later. #618

Merged
merged 10 commits into from
Aug 14, 2022

Conversation

sqeezy
Copy link
Contributor

@sqeezy sqeezy commented Jul 8, 2022

When profiling application build times I noticed that a lot of my performance went into a List.Contains call.
This seems like a problem that's easily solved. I'm well aware that I might have missed some detail here, but this kind of change would bring a lot of performance to applications registering a lot of components.

This is just a rough draft, but I would be very much interested in your input and explanations.

Thank you!

Copy link
Member

@jonorossi jonorossi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense with the util method being used from 2 places.

Naming wise, let's go with the purpose rather than "fast" to keep it consistent.

Watch out for code formatting to kept things consistent.

Can you also update the changelog.

src/Castle.Windsor/Core/ComponentModel.cs Outdated Show resolved Hide resolved
src/Castle.Windsor/Core/ComponentModel.cs Outdated Show resolved Hide resolved
src/Castle.Windsor/Core/ComponentModel.cs Outdated Show resolved Hide resolved
src/Castle.Windsor/Core/Internal/ComponentServicesUtil.cs Outdated Show resolved Hide resolved
src/Castle.Windsor/MicroKernel/Handlers/AbstractHandler.cs Outdated Show resolved Hide resolved
sqeezy and others added 8 commits August 2, 2022 18:49
Co-authored-by: Jonathon Rossi <jono@jonorossi.com>
Co-authored-by: Jonathon Rossi <jono@jonorossi.com>
Co-authored-by: Jonathon Rossi <jono@jonorossi.com>
Co-authored-by: Jonathon Rossi <jono@jonorossi.com>
Co-authored-by: Jonathon Rossi <jono@jonorossi.com>
…ion.cs

Co-authored-by: Jonathon Rossi <jono@jonorossi.com>
…ion.cs

Co-authored-by: Jonathon Rossi <jono@jonorossi.com>
@sqeezy
Copy link
Contributor Author

sqeezy commented Aug 2, 2022

All your proposed changes are commited.
I think the formatting did not get changed in the process.

@jonorossi jonorossi merged commit c493ef6 into castleproject:master Aug 14, 2022
@sqeezy sqeezy deleted the faster_type_lookup branch August 14, 2022 10:50
@sqeezy sqeezy mentioned this pull request Aug 17, 2022
6 tasks
@jonorossi jonorossi added this to the v6.0.0 milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants