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

Compiled query APIs has generically-typed parameters, but delegates to param object[] #21126

Open
roji opened this issue Jun 3, 2020 · 0 comments

Comments

@roji
Copy link
Member

roji commented Jun 3, 2020

Our compiled query API surface is nice and generic, accepting up to 16 generic parameters (e.g. CompileAsyncQuery). However, these generic methods seem to call into non-generic methods which accept params object[], so that an array parameter is allocated and all parameter values are boxed.

Actually flowing generic parameters all the way into QueryContext (and from there into a generic DbParameter, if we ever get one), is likely to require quite a bit of work. In the meantime we can at least avoid the array allocation on every execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants