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

Expando fixup needed from reference source. #226

Open
FransBouma opened this issue Mar 6, 2015 · 0 comments
Open

Expando fixup needed from reference source. #226

FransBouma opened this issue Mar 6, 2015 · 0 comments

Comments

@FransBouma
Copy link
Owner

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.

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