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

Defer string creation in ColumnDefinitionPayload #343

Merged
merged 1 commit into from
Oct 1, 2017

Conversation

bgrainger
Copy link
Member

@bgrainger bgrainger commented Oct 1, 2017

There's no need to deserialize the column & table names unless the schema is read.

See #342 for baseline allocations. This reduces ExecuteScalarSync from 1.95KB to 1.88KB and ManyRowsSync from 3.69KB to 2.63KB.

Method Job Runtime Toolchain Mean Error StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolAsync net47 Clr CsProjnet47 209.36 us 0.5100 us 0.4771 us 0.1232 us 208.64 us 209.02 us 209.24 us 209.86 us 210.17 us 4,776.4 1.4648 - - 9.44 KB
OpenFromPoolSync net47 Clr CsProjnet47 82.93 us 0.3008 us 0.2348 us 0.0678 us 82.69 us 82.76 us 82.85 us 83.00 us 83.38 us 12,058.9 0.1221 - - 1.43 KB
ExecuteScalarAsync net47 Clr CsProjnet47 118.43 us 2.9064 us 3.2305 us 0.7411 us 114.14 us 115.56 us 117.78 us 119.96 us 127.32 us 8,443.7 0.9766 - - 6.72 KB
ExecuteScalarSync net47 Clr CsProjnet47 75.16 us 0.4201 us 0.3929 us 0.1015 us 74.40 us 74.82 us 75.15 us 75.53 us 75.76 us 13,304.4 0.2441 - - 1.88 KB
ReadBlobsAsync net47 Clr CsProjnet47 1,994.43 us 31.9807 us 29.9147 us 7.7240 us 1,940.21 us 1,967.89 us 1,994.08 us 2,019.07 us 2,039.66 us 501.4 332.0313 332.0313 332.0313 1104.27 KB
ReadBlobsSync net47 Clr CsProjnet47 1,699.35 us 21.0650 us 18.6736 us 4.9907 us 1,679.38 us 1,686.62 us 1,696.84 us 1,710.03 us 1,747.45 us 588.5 332.0313 332.0313 332.0313 1076.95 KB
ManyRowsAsync net47 Clr CsProjnet47 5,660.33 us 55.3183 us 51.7447 us 13.3604 us 5,607.62 us 5,618.53 us 5,635.37 us 5,691.68 us 5,765.94 us 176.7 - - - 26.06 KB
ManyRowsSync net47 Clr CsProjnet47 5,050.43 us 11.9634 us 9.9899 us 2.7707 us 5,033.91 us 5,042.83 us 5,052.34 us 5,059.11 us 5,064.72 us 198.0 - - - 2.63 KB
OpenFromPoolAsync netcore11 Core CoreCsProj 208.62 us 1.7349 us 1.6228 us 0.4190 us 207.09 us 207.40 us 207.85 us 210.14 us 212.21 us 4,793.4 1.4648 0.2441 - 3.38 KB
OpenFromPoolSync netcore11 Core CoreCsProj 81.03 us 1.5912 us 1.4105 us 0.3770 us 79.60 us 80.00 us 80.48 us 81.85 us 84.40 us 12,340.7 0.1221 - - 1.38 KB
ExecuteScalarAsync netcore11 Core CoreCsProj 113.34 us 1.0671 us 0.9460 us 0.2528 us 112.16 us 112.81 us 112.91 us 113.61 us 115.55 us 8,823.0 0.9766 - - 2.75 KB
ExecuteScalarSync netcore11 Core CoreCsProj 72.48 us 0.3449 us 0.3226 us 0.0833 us 71.91 us 72.28 us 72.47 us 72.70 us 72.97 us 13,797.0 0.2441 - - 1.86 KB
ReadBlobsAsync netcore11 Core CoreCsProj 1,989.07 us 35.8002 us 33.4875 us 8.6464 us 1,926.64 us 1,966.77 us 1,987.56 us 2,013.19 us 2,062.74 us 502.7 332.0313 332.0313 332.0313 2.54 KB
ReadBlobsSync netcore11 Core CoreCsProj 1,784.59 us 29.1072 us 27.2269 us 7.0300 us 1,743.31 us 1,758.15 us 1,783.73 us 1,811.44 us 1,833.80 us 560.4 332.0313 332.0313 332.0313 1076 KB
ManyRowsAsync netcore11 Core CoreCsProj 4,921.32 us 27.8355 us 26.0374 us 6.7228 us 4,863.30 us 4,901.64 us 4,928.22 us 4,941.27 us 4,961.23 us 203.2 - - - 2.68 KB
ManyRowsSync netcore11 Core CoreCsProj 4,628.90 us 29.3238 us 24.4867 us 6.7914 us 4,568.24 us 4,615.64 us 4,639.46 us 4,645.35 us 4,653.09 us 216.0 - - - 2.6 KB
OpenFromPoolAsync netcore20 Core CoreCsProj 210.84 us 2.9461 us 2.4602 us 0.6823 us 205.88 us 209.45 us 210.09 us 212.63 us 215.51 us 4,743.0 0.9766 - - 3.73 KB
OpenFromPoolSync netcore20 Core CoreCsProj 77.42 us 0.2488 us 0.2328 us 0.0601 us 77.04 us 77.22 us 77.40 us 77.56 us 77.87 us 12,917.0 0.1221 - - 1.35 KB
ExecuteScalarAsync netcore20 Core CoreCsProj 114.84 us 2.1471 us 2.2049 us 0.5348 us 111.77 us 113.34 us 114.34 us 115.91 us 121.00 us 8,707.7 0.7324 - - 4.16 KB
ExecuteScalarSync netcore20 Core CoreCsProj 69.80 us 1.1712 us 1.0956 us 0.2829 us 68.38 us 68.87 us 69.78 us 70.37 us 71.90 us 14,326.0 0.2441 - - 1.81 KB
ReadBlobsAsync netcore20 Core CoreCsProj 1,940.54 us 38.0695 us 68.6472 us 10.7209 us 1,846.89 us 1,885.88 us 1,929.57 us 1,992.09 us 2,100.42 us 515.3 332.0313 332.0313 332.0313 3.95 KB
ReadBlobsSync netcore20 Core CoreCsProj 1,751.68 us 33.4615 us 32.8636 us 8.2159 us 1,712.87 us 1,723.44 us 1,741.59 us 1,776.02 us 1,822.03 us 570.9 332.0313 332.0313 332.0313 1075.96 KB
ManyRowsAsync netcore20 Core CoreCsProj 3,972.40 us 33.3442 us 29.5587 us 7.8999 us 3,932.20 us 3,946.48 us 3,971.95 us 3,998.24 us 4,021.67 us 251.7 - - - 4.02 KB
ManyRowsSync netcore20 Core CoreCsProj 3,957.59 us 24.1259 us 22.5674 us 5.8269 us 3,920.33 us 3,933.43 us 3,966.05 us 3,974.76 us 3,993.66 us 252.7 - - - 2.49 KB

There's no need to deserialize the column & table names unless the schema is read.
@bgrainger bgrainger merged commit ac4c185 into mysql-net:master Oct 1, 2017
@bgrainger bgrainger deleted the reduce-allocations branch October 1, 2017 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant