Replies: 2 comments 8 replies
-
Thanks for reporting. I have never measured this. public static partial IQueryable<MyQueryResult> QueryAs(this IQueryable<MyEntity> queryable); )? |
Beta Was this translation helpful? Give feedback.
-
It is actually pretty hard to measure too. My first instict was to use dotProfiler, but couldn't find the reason, so I used the step-by-step debugger, and there I noticed that after entering inside the QueryAs method, the debugger would wait for a long time before actually entering the method.
I have to ask, but it's a big switch with lots (hundreds) of
No, in that case, the mapping works without issues. |
Beta Was this translation helpful? Give feedback.
-
Our codebase heavily relies on Mapperly to map API answers and SQL projections.
We have noticed that the response time for the first request was taking considerabily long (even minutes!), and found Mapperly's generic mapping method to be the problem.
The generated code uses a lot of reflection, which I believe has to warm up the reflection metadata for every mapped class (this is my guess) the first time it is used.
Does anybody have any suggestions on how to improve this? Unfortunately, a pre-warmup of this data by calling it before initialization is out of discussion :(
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions