You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dapper uses its own Expando implementation for dynamic which is much faster than what .NET offers with its Expando implementation. The main pain point is that 60% of the time during a fetch is spent inside ExpandoObject.Add() and most of the time is wasted finding indexes for a name for a field, but we already know this name up-front (for our fetches, that is).
We can't borrow Dapper's expando implementation as it misses key features from .NET's implementation, so what we need really is a fork of the class from Referencesource (the MIT licensed .NET sourcecode here on github from MS) and update it with some code which uses the table meta information and which can skip the needless lookups when we're fetching data. Of course when the user of the object adds his/her own properties dynamically, these should go through the normal code so nothing breaks.
This is a difficult addition, so if you pick this up, be sure to test it thoroughly.
The text was updated successfully, but these errors were encountered:
Dapper uses its own Expando implementation for dynamic which is much faster than what .NET offers with its Expando implementation. The main pain point is that 60% of the time during a fetch is spent inside ExpandoObject.Add() and most of the time is wasted finding indexes for a name for a field, but we already know this name up-front (for our fetches, that is).
We can't borrow Dapper's expando implementation as it misses key features from .NET's implementation, so what we need really is a fork of the class from Referencesource (the MIT licensed .NET sourcecode here on github from MS) and update it with some code which uses the table meta information and which can skip the needless lookups when we're fetching data. Of course when the user of the object adds his/her own properties dynamically, these should go through the normal code so nothing breaks.
This is a difficult addition, so if you pick this up, be sure to test it thoroughly.
The text was updated successfully, but these errors were encountered: