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

SqlBulkCopy - ReadWriteColumnValueAsync creates lot of garbage #353

Open
cmeyertons opened this issue Dec 13, 2019 · 5 comments
Open

SqlBulkCopy - ReadWriteColumnValueAsync creates lot of garbage #353

cmeyertons opened this issue Dec 13, 2019 · 5 comments
Labels
💡 Enhancement Issues that are feature requests for the drivers we maintain.

Comments

@cmeyertons
Copy link
Contributor

ReadWriteColumnValueAsync is written generically, retrieving an object representation of the row's value and passing around object between the read & write. Usually this is a value type that gets boxed, creating GC pressure.

Describe the solution you'd like

I would like ReadWriteColumnValueAsync to leverage generics and the full IDataReader interface to avoid boxing unless absolutely necessary.

This read value portion should also respect IDataReader.GetFieldType and its underlying value getters (GetDecimal, etc.)

@cheenamalhotra
Copy link
Member

Hi @cmeyertons

If you'd like to contribute a PR to improve memory management in this API, feel free to do to so. That way it can be reviewed faster and you can get this improvement merged in driver sooner. We'll definitely consider otherwise but it may not stand up in priority list.

@cmeyertons
Copy link
Contributor Author

Awesome, already have a fork and some work going. Will keep you posted

@cheenamalhotra cheenamalhotra added the 💡 Enhancement Issues that are feature requests for the drivers we maintain. label Dec 14, 2019
@cmeyertons
Copy link
Contributor Author

@cheenamalhotra would it be possible to move this one out of Waiting for Customer?

I have had a PR open for a while with outstanding questions. Thank you!

@cheenamalhotra
Copy link
Member

Could you also update your PR to dotnet/master and resolve conflicts?

@cheenamalhotra cheenamalhotra linked a pull request Mar 19, 2020 that will close this issue
@benrr101
Copy link
Contributor

Updating to link to the more recent PR #1048

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Enhancement Issues that are feature requests for the drivers we maintain.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants