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

Cache PropertyInfos in AutomaticMapper #1

Closed
joeyb opened this issue Apr 7, 2014 · 1 comment
Closed

Cache PropertyInfos in AutomaticMapper #1

joeyb opened this issue Apr 7, 2014 · 1 comment

Comments

@joeyb
Copy link
Owner

joeyb commented Apr 7, 2014

The AutomaticMapper<TSrc, TDest> class currently does no caching and re-grabs the PropertyInfos for the src and dest each time the mapping is run. This can be sped up by caching those during the first mapping so that subsequent runs don't need to do it.

I'm still trying to decide whether the PropertyInfos should be cached per instance or statically. I'm leaning towards doing it per instance because I think that fits the philosophy of the project better by leaving that cache lifespan decision up to the IoC container. That would allow the cache to actually be garbage collected if needed.

@joeyb
Copy link
Owner Author

joeyb commented Apr 7, 2014

This was fixed in 81b2833. The cache is done per instance so that its lifetime is up to the IoC container.

@joeyb joeyb closed this as completed Apr 7, 2014
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

No branches or pull requests

1 participant