Skip to content

Very large automapping config - discussion on memory, alternatives, caching and processing in .Net Core 3+ #3579

Answered by jbogard
statler asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure this is too complex - it's pretty close to what I see in production. In terms of expression tree compilation, yeah in the past it was CPU intensive. We cached it because it was slow to compile multiple times, but obviously there's a tradeoff. We defer that compilation for the first time you map, though.

With ProjectTo, there is no expression compilation, so you do save something there. I try to default to ProjectTo anyway because it's more efficient all around.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by lbargaoanu
Comment options

You must be logged in to vote
1 reply
@jbogard
Comment options

Comment options

You must be logged in to vote
1 reply
@jbogard
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3578 on February 16, 2021 05:34.