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

Improve Performance #245

Merged
merged 12 commits into from
Apr 23, 2017
Merged

Improve Performance #245

merged 12 commits into from
Apr 23, 2017

Conversation

bgrainger
Copy link
Member

Improve the speed and reduce the number of allocations in common scenarios, based on the recently-added BenchmarkDotNet benchmarks.

This produces a 20% reduction in allocations in the "ManyRowsNewSync" scenario.
This reduces allocations in the "ManyRowsNewSync" scenario by 44%.
This reduces allocations in the "ManyRowsNewSync" scenario by 19%.
This reduces allocations in the "ManyRowsNewSync" scenario by 24%.
Also switch to using -1 as a sentinel instead of null to reuse function signature between read and write.

This reduces allocations for the "ManyRowsNewSync" scenario by 49%.
This reduces allocations in the "ExecuteScalarNewAsync" scenario by 3%.
This reduces the allocations for the "ExecuteScalarNewSync" scenario by 10%.
@bgrainger
Copy link
Member Author

Summary

The connector was very memory-inefficient. The ManyRowsNewSync benchmark in particular has been improved to allocate 1/10th as much and now runs twice as fast.

All Sync methods in this connector are now (up to 20%) faster than Connector/NET and allocate less memory (as little as 30% of Connector/NET allocations).

Async methods still pay the performance penalty of constructing the async state machine (but should support higher concurrency). There is still room for further improvement in the async code paths.

Details

Timings after each commit in this PR, taken from my Windows desktop computer.

Initial Timings

Method Mean StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 101.1378 us 1.2535 us 0.3350 us 99.5985 us 100.3732 us 100.9615 us 101.7922 us 103.7275 us 9887.5 - - - 724 B
OpenFromPoolOldSync 99.0344 us 2.0196 us 0.5398 us 97.2859 us 97.9003 us 98.0966 us 99.0444 us 104.7935 us 10097.51 - - - 556 B
OpenFromPoolNewAsync 995.4246 us 5.1151 us 1.3207 us 985.2398 us 991.7371 us 996.7315 us 998.9607 us 1,003.5541 us 1004.6 - - - 15.45 kB
OpenFromPoolNewSync 981.1122 us 11.0512 us 2.8534 us 965.8175 us 971.9769 us 983.6438 us 990.0643 us 1,001.1872 us 1019.25 - - - 4.42 kB
ExecuteScalarOldAsync 86.1507 us 0.3243 us 0.0867 us 85.4244 us 86.0146 us 86.2052 us 86.2983 us 86.7528 us 11607.57 - - - 4.18 kB
ExecuteScalarOldSync 85.1829 us 0.4215 us 0.1088 us 84.4037 us 84.8551 us 85.0907 us 85.4801 us 86.0250 us 11739.45 - - - 4.03 kB
ExecuteScalarNewAsync 118.3336 us 0.8783 us 0.2268 us 116.9770 us 117.6958 us 118.1206 us 119.3764 us 119.6164 us 8450.68 - - - 10.87 kB
ExecuteScalarNewSync 79.5749 us 0.9593 us 0.2477 us 78.3771 us 78.6911 us 79.4602 us 80.0975 us 81.7094 us 12566.78 - - - 6.06 kB
ReadBlobsOldAsync 2,502.8404 us 35.3598 us 9.1299 us 2,434.3172 us 2,489.6931 us 2,498.3485 us 2,530.4020 us 2,560.2079 us 399.55 247.3958 247.3958 247.3958 1.11 MB
ReadBlobsOldSync 2,397.4243 us 12.1243 us 3.3627 us 2,378.3551 us 2,387.9051 us 2,394.9923 us 2,410.2859 us 2,416.7431 us 417.11 241.1458 241.1458 241.1458 1.11 MB
ReadBlobsNewAsync 2,643.4930 us 24.7349 us 6.3865 us 2,614.9663 us 2,618.8060 us 2,642.9578 us 2,668.5804 us 2,688.4892 us 378.29 259.3750 259.3750 259.3750 1.14 MB
ReadBlobsNewSync 2,337.2358 us 79.7424 us 20.5894 us 2,259.6348 us 2,282.5816 us 2,302.7401 us 2,401.0013 us 2,542.2784 us 427.86 244.7917 244.7917 244.7917 1.11 MB
ManyRowsOldAsync 7,439.4090 us 22.6614 us 5.8512 us 7,399.8809 us 7,415.6064 us 7,438.8830 us 7,458.7964 us 7,468.5194 us 134.42 52.0833 - - 2.3 MB
ManyRowsOldSync 7,400.6427 us 35.5971 us 9.1911 us 7,347.1047 us 7,372.7181 us 7,391.8434 us 7,437.3795 us 7,462.3881 us 135.12 68.7500 - - 2.3 MB
ManyRowsNewAsync 9,410.6541 us 28.1052 us 7.2567 us 9,375.6146 us 9,386.0799 us 9,402.1719 us 9,420.5091 us 9,469.2067 us 106.26 875.0000 - - 7.2 MB
ManyRowsNewSync 8,427.4333 us 45.5161 us 12.1647 us 8,380.2733 us 8,397.7765 us 8,411.4859 us 8,451.9451 us 8,551.2647 us 118.66 858.3333 - - 7.15 MB

Rewrite ReadPayloadAsync

Method Mean StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 101.6349 us 0.9212 us 0.2659 us 99.9817 us 101.2692 us 101.5256 us 102.1379 us 103.3299 us 9839.14 - - - 724 B
OpenFromPoolOldSync 97.8451 us 0.4636 us 0.1239 us 97.0294 us 97.6026 us 97.7188 us 98.2209 us 98.7141 us 10220.23 - - - 554 B
OpenFromPoolNewAsync 996.7738 us 5.3728 us 1.3873 us 988.0896 us 991.0038 us 997.9913 us 1,001.8276 us 1,004.6341 us 1003.24 - - - 15.42 kB
OpenFromPoolNewSync 982.8084 us 11.7653 us 3.0378 us 953.2180 us 974.6813 us 987.6816 us 991.1273 us 996.4710 us 1017.49 - - - 3.97 kB
ExecuteScalarOldAsync 87.2266 us 0.3539 us 0.0946 us 86.4754 us 87.0246 us 87.2095 us 87.4811 us 87.9119 us 11464.39 - - - 4.18 kB
ExecuteScalarOldSync 86.6057 us 0.9812 us 0.2533 us 85.7213 us 85.8623 us 86.0833 us 87.4962 us 88.4135 us 11546.58 - - - 4.03 kB
ExecuteScalarNewAsync 119.0430 us 1.0515 us 0.2715 us 117.3424 us 118.0870 us 119.1261 us 119.8426 us 120.8817 us 8400.32 - - - 10.27 kB
ExecuteScalarNewSync 79.1937 us 0.3852 us 0.1029 us 78.4180 us 78.9766 us 79.1100 us 79.5194 us 79.7691 us 12627.27 - - - 5.3 kB
ReadBlobsOldAsync 2,564.1276 us 23.1978 us 6.4339 us 2,515.1315 us 2,552.1576 us 2,560.1956 us 2,580.4343 us 2,606.9779 us 390 255.7292 255.7292 255.7292 1.11 MB
ReadBlobsOldSync 2,395.3818 us 14.1790 us 3.6610 us 2,367.1813 us 2,385.6078 us 2,395.9586 us 2,410.8593 us 2,413.8307 us 417.47 241.1458 241.1458 241.1458 1.11 MB
ReadBlobsNewAsync 2,737.8162 us 95.4092 us 24.6345 us 2,641.6148 us 2,666.3210 us 2,691.8863 us 2,863.5421 us 2,898.5441 us 365.25 259.3750 259.3750 259.3750 1.14 MB
ReadBlobsNewSync 2,287.1641 us 25.1879 us 6.5035 us 2,251.7949 us 2,262.9155 us 2,283.8759 us 2,300.9645 us 2,332.3581 us 437.22 248.9583 248.9583 248.9583 1.11 MB
ManyRowsOldAsync 7,572.7754 us 191.3436 us 49.4047 us 7,367.9095 us 7,433.4872 us 7,519.8856 us 7,741.4807 us 7,953.7285 us 132.05 60.4167 - - 2.3 MB
ManyRowsOldSync 7,369.1454 us 38.9319 us 10.0522 us 7,303.3276 us 7,335.0534 us 7,358.3758 us 7,401.4925 us 7,432.6960 us 135.7 85.4167 - - 2.3 MB
ManyRowsNewAsync 9,082.1729 us 41.5714 us 10.7337 us 9,031.4978 us 9,055.8557 us 9,070.9580 us 9,115.4768 us 9,168.5548 us 110.11 591.6667 - - 5.72 MB
ManyRowsNewSync 8,111.8833 us 20.5676 us 5.4969 us 8,071.1636 us 8,102.0922 us 8,113.6205 us 8,120.9425 us 8,150.0383 us 123.28 616.6667 - - 5.68 MB

Rewrite ReadPacketAsync

Method Mean StdErr StdDev Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 100.1587 us 0.3995 us 1.4946 us 98.8925 us 99.0832 us 99.7133 us 100.8045 us 104.2371 us 9984.15 - - - 724 B
OpenFromPoolOldSync 98.7108 us 0.1441 us 0.5580 us 97.8675 us 98.2338 us 98.9015 us 99.1432 us 99.5059 us 10130.6 - - - 556 B
OpenFromPoolNewAsync 995.6315 us 1.7413 us 6.5153 us 981.8233 us 994.1248 us 997.2182 us 998.6140 us 1,003.5775 us 1004.39 - - - 15.07 kB
OpenFromPoolNewSync 984.5552 us 2.4319 us 9.4187 us 968.8873 us 979.7295 us 982.8510 us 991.8054 us 1,001.7999 us 1015.69 - - - 3.2 kB
ExecuteScalarOldAsync 86.7996 us 0.0727 us 0.2817 us 86.2906 us 86.6414 us 86.7607 us 87.0583 us 87.2304 us 11520.79 - - - 4.18 kB
ExecuteScalarOldSync 85.2030 us 0.1670 us 0.6248 us 84.0259 us 84.7730 us 85.1910 us 85.5076 us 86.3999 us 11736.67 - - - 4.03 kB
ExecuteScalarNewAsync 119.5326 us 0.5489 us 2.1260 us 117.3868 us 117.7195 us 118.2758 us 121.0744 us 123.1827 us 8365.92 - - - 9.1 kB
ExecuteScalarNewSync 78.6961 us 0.1068 us 0.4138 us 78.0580 us 78.4133 us 78.6836 us 79.0292 us 79.5248 us 12707.1 - - - 4.02 kB
ReadBlobsOldAsync 2,603.1177 us 11.1710 us 43.2651 us 2,518.8345 us 2,576.5633 us 2,596.5958 us 2,645.6462 us 2,666.9297 us 384.15 249.4792 249.4792 249.4792 1.11 MB
ReadBlobsOldSync 2,447.2146 us 5.9561 us 22.2858 us 2,423.2608 us 2,431.4809 us 2,439.0435 us 2,453.1561 us 2,492.4285 us 408.63 243.2292 243.2292 243.2292 1.11 MB
ReadBlobsNewAsync 2,662.4986 us 2.6187 us 9.7982 us 2,643.4389 us 2,655.7920 us 2,664.3065 us 2,670.4499 us 2,675.1395 us 375.59 259.3750 259.3750 259.3750 1.14 MB
ReadBlobsNewSync 2,394.7004 us 30.3765 us 117.6478 us 2,279.9397 us 2,303.8188 us 2,353.2564 us 2,498.3228 us 2,695.4729 us 417.59 246.8750 246.8750 246.8750 1.11 MB
ManyRowsOldAsync 7,519.1589 us 12.2738 us 47.5361 us 7,463.4802 us 7,472.2868 us 7,513.3050 us 7,569.1322 us 7,588.8073 us 132.99 85.4167 - - 2.3 MB
ManyRowsOldSync 7,327.3281 us 11.5479 us 43.2085 us 7,257.6089 us 7,285.6966 us 7,335.3931 us 7,352.8505 us 7,393.5021 us 136.48 68.7500 - - 2.3 MB
ManyRowsNewAsync 8,685.5554 us 7.8859 us 30.5421 us 8,638.2874 us 8,658.3566 us 8,687.8556 us 8,717.7761 us 8,730.6516 us 115.13 241.6667 - - 3.23 MB
ManyRowsNewSync 7,764.0321 us 42.5791 us 164.9083 us 7,568.5807 us 7,615.8762 us 7,710.8063 us 7,967.5912 us 8,052.8899 us 128.8 143.7500 - - 3.19 MB

Eagerly Create CancelAction

Method Mean StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 99.9588 us 0.6249 us 0.1733 us 99.2376 us 99.3529 us 99.9742 us 100.2823 us 101.4735 us 10004.12 - - - 724 B
OpenFromPoolOldSync 99.9011 us 2.3863 us 0.6378 us 97.8703 us 98.3406 us 98.8437 us 101.0974 us 105.2284 us 10009.9 - - - 556 B
OpenFromPoolNewAsync 995.4036 us 4.3207 us 1.1548 us 989.3397 us 991.3730 us 994.6228 us 999.0777 us 1,002.3320 us 1004.62 - - - 15.07 kB
OpenFromPoolNewSync 983.1721 us 7.4424 us 1.9891 us 970.1737 us 978.4557 us 983.4300 us 989.0436 us 996.2694 us 1017.12 - - - 3.2 kB
ExecuteScalarOldAsync 87.3221 us 0.4905 us 0.1311 us 86.5422 us 86.9921 us 87.3303 us 87.6890 us 88.0801 us 11451.86 - - - 4.18 kB
ExecuteScalarOldSync 85.2778 us 0.3243 us 0.0837 us 84.9194 us 84.9392 us 85.2440 us 85.5964 us 85.7663 us 11726.38 - - - 4.03 kB
ExecuteScalarNewAsync 119.6569 us 1.3678 us 0.3532 us 117.4025 us 118.5228 us 119.4115 us 120.5564 us 122.2658 us 8357.22 - - - 8.97 kB
ExecuteScalarNewSync 79.4232 us 0.2533 us 0.0654 us 78.9541 us 79.2816 us 79.4256 us 79.5798 us 79.9621 us 12590.77 - - - 3.9 kB
ReadBlobsOldAsync 2,593.4880 us 67.9515 us 17.5450 us 2,511.8528 us 2,532.2221 us 2,566.9766 us 2,664.7773 us 2,698.2489 us 385.58 245.3125 245.3125 245.3125 1.11 MB
ReadBlobsOldSync 2,496.4611 us 81.8616 us 21.8784 us 2,428.2872 us 2,448.5625 us 2,460.5880 us 2,503.7597 us 2,691.8604 us 400.57 241.1458 241.1458 241.1458 1.11 MB
ReadBlobsNewAsync 2,663.2133 us 11.3145 us 2.9214 us 2,646.3114 us 2,651.4707 us 2,662.5798 us 2,676.2227 us 2,677.9112 us 375.49 263.5417 263.5417 263.5417 1.14 MB
ReadBlobsNewSync 2,275.6145 us 23.8511 us 6.1583 us 2,248.7663 us 2,254.0883 us 2,265.3440 us 2,293.7502 us 2,326.2412 us 439.44 251.0417 251.0417 251.0417 1.11 MB
ManyRowsOldAsync 7,387.9527 us 11.0667 us 3.1947 us 7,368.6487 us 7,378.9124 us 7,390.1567 us 7,395.2793 us 7,406.2762 us 135.36 43.7500 - - 2.3 MB
ManyRowsOldSync 7,300.5668 us 17.2165 us 4.4453 us 7,273.4712 us 7,288.2344 us 7,297.7467 us 7,311.8868 us 7,331.1312 us 136.98 77.0833 - - 2.3 MB
ManyRowsNewAsync 8,461.3257 us 54.6042 us 15.1445 us 8,410.7241 us 8,416.1217 us 8,455.4353 us 8,489.1727 us 8,611.0953 us 118.18 116.6667 - - 2.6 MB
ManyRowsNewSync 7,894.0821 us 225.1854 us 60.1833 us 7,641.7096 us 7,727.5764 us 7,853.3755 us 7,979.0463 us 8,453.8432 us 126.68 116.6667 - - 2.57 MB

Inline MySqlSession.TryAsync

Method Mean StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 101.0246 us 1.7385 us 0.4646 us 99.2506 us 99.9237 us 100.4672 us 101.9586 us 105.7496 us 9898.58 - - - 724 B
OpenFromPoolOldSync 100.3909 us 0.9347 us 0.2498 us 98.5941 us 99.8988 us 100.2794 us 101.0567 us 102.2645 us 9961.06 - - - 556 B
OpenFromPoolNewAsync 990.9365 us 11.0840 us 2.9623 us 961.2722 us 985.7974 us 992.9740 us 1,000.1712 us 1,003.5458 us 1009.15 - - - 14.66 kB
OpenFromPoolNewSync 988.3009 us 7.7611 us 2.0039 us 975.9666 us 983.2897 us 987.9737 us 994.5603 us 1,005.7691 us 1011.84 - - - 2.82 kB
ExecuteScalarOldAsync 87.0014 us 0.4133 us 0.1067 us 86.4289 us 86.6671 us 86.9005 us 87.3732 us 87.7993 us 11494.07 - - - 4.18 kB
ExecuteScalarOldSync 85.4920 us 0.3865 us 0.0998 us 84.8699 us 85.1423 us 85.5297 us 85.8276 us 86.2261 us 11697 - - - 4.03 kB
ExecuteScalarNewAsync 119.5029 us 3.3047 us 0.8533 us 116.0379 us 117.2498 us 119.1270 us 122.1119 us 127.0340 us 8368 - - - 8.61 kB
ExecuteScalarNewSync 77.8190 us 1.0781 us 0.2784 us 76.2459 us 76.7220 us 78.0293 us 78.6898 us 79.8196 us 12850.33 - - - 3.51 kB
ReadBlobsOldAsync 2,580.3527 us 18.6995 us 4.9976 us 2,556.4860 us 2,567.4278 us 2,576.7694 us 2,582.9654 us 2,621.3970 us 387.54 247.3958 247.3958 247.3958 1.11 MB
ReadBlobsOldSync 2,503.2018 us 20.0418 us 5.3564 us 2,468.2173 us 2,494.0003 us 2,502.8252 us 2,519.2219 us 2,537.9142 us 399.49 247.3958 247.3958 247.3958 1.11 MB
ReadBlobsNewAsync 2,699.0702 us 21.5472 us 5.5635 us 2,666.6427 us 2,678.1069 us 2,699.1910 us 2,714.6049 us 2,736.5595 us 370.5 257.2917 257.2917 257.2917 1.14 MB
ReadBlobsNewSync 2,347.5926 us 16.6034 us 4.2870 us 2,317.4736 us 2,333.0157 us 2,343.8843 us 2,363.0852 us 2,370.5401 us 425.97 251.0417 251.0417 251.0417 1.11 MB
ManyRowsOldAsync 7,615.6175 us 131.7684 us 34.0225 us 7,486.0712 us 7,521.4627 us 7,565.7615 us 7,695.7532 us 7,946.0225 us 131.31 35.4167 - - 2.3 MB
ManyRowsOldSync 7,446.7941 us 25.8893 us 6.9192 us 7,401.6862 us 7,428.6834 us 7,446.0905 us 7,468.9593 us 7,483.2826 us 134.29 93.7500 - - 2.3 MB
ManyRowsNewAsync 7,528.9268 us 16.4601 us 4.2500 us 7,498.5676 us 7,515.1087 us 7,530.7241 us 7,541.2628 us 7,558.7660 us 132.82 - - - 1.98 MB
ManyRowsNewSync 6,823.2222 us 51.8283 us 13.3820 us 6,757.7300 us 6,783.3343 us 6,803.7792 us 6,857.3154 us 6,911.2273 us 146.56 22.9167 - - 1.95 MB

Lazily create CancelAction (RegisterCancel)

Method Mean StdDev StdErr Median Min Q1 Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 101.8129 us 2.3163 us 0.6191 us 101.0284 us 98.6180 us 100.3607 us 103.4915 us 106.9493 us 9821.94 - - - 724 B
OpenFromPoolOldSync 98.9262 us 0.7922 us 0.2197 us 98.8484 us 97.4906 us 98.3741 us 99.4725 us 100.2527 us 10108.54 - - - 556 B
OpenFromPoolNewAsync 981.9389 us 16.2476 us 4.1951 us 987.4066 us 946.9726 us 966.8574 us 996.9841 us 998.5924 us 1018.39 - - - 14.69 kB
OpenFromPoolNewSync 980.0627 us 9.3785 us 2.4215 us 978.0960 us 965.5539 us 975.0455 us 986.1076 us 999.2420 us 1020.34 - - - 2.82 kB
ExecuteScalarOldAsync 92.7911 us 5.1877 us 0.9171 us 91.7632 us 86.9945 us 88.4309 us 96.7358 us 107.8823 us 10776.89 - - - 4.18 kB
ExecuteScalarOldSync 91.9098 us 5.9431 us 0.9170 us 89.4087 us 85.2018 us 86.7084 us 96.0427 us 106.5365 us 10880.23 - - - 4.03 kB
ExecuteScalarNewAsync 132.1568 us 11.5963 us 1.3130 us 131.4416 us 116.9476 us 121.2744 us 139.6328 us 158.7941 us 7566.77 - - - 8.51 kB
ExecuteScalarNewSync 77.4552 us 0.2695 us 0.0747 us 77.4480 us 77.0910 us 77.1933 us 77.6234 us 78.0479 us 12910.69 - - - 3.45 kB
ReadBlobsOldAsync 2,693.4647 us 110.0607 us 26.6936 us 2,652.2877 us 2,601.9841 us 2,614.2811 us 2,746.6450 us 2,912.7360 us 371.27 268.2292 268.2292 268.2292 1.11 MB
ReadBlobsOldSync 2,466.5994 us 19.9996 us 5.3451 us 2,466.2717 us 2,440.6055 us 2,454.6723 us 2,476.5193 us 2,507.2715 us 405.42 241.1458 241.1458 241.1458 1.11 MB
ReadBlobsNewAsync 2,638.4302 us 18.1571 us 5.0359 us 2,640.6188 us 2,611.7888 us 2,619.9483 us 2,652.7612 us 2,668.3996 us 379.01 263.5417 263.5417 263.5417 1.14 MB
ReadBlobsNewSync 2,331.6997 us 21.1829 us 5.4694 us 2,338.2115 us 2,298.1716 us 2,309.2990 us 2,348.9838 us 2,361.0505 us 428.87 263.5417 263.5417 263.5417 1.11 MB
ManyRowsOldAsync 7,561.1684 us 50.6216 us 13.0704 us 7,562.1422 us 7,481.7280 us 7,515.3874 us 7,606.0562 us 7,651.0973 us 132.25 - - - 2.3 MB
ManyRowsOldSync 7,399.6329 us 34.0534 us 8.7925 us 7,394.9672 us 7,343.8228 us 7,370.2243 us 7,428.4525 us 7,464.1555 us 135.14 60.4167 - - 2.3 MB
ManyRowsNewAsync 7,342.0225 us 22.1555 us 5.7205 us 7,341.1739 us 7,310.8685 us 7,324.3029 us 7,358.3839 us 7,383.4933 us 136.2 14.5833 - - 1.98 MB
ManyRowsNewSync 6,614.4860 us 44.7886 us 11.5644 us 6,622.9646 us 6,541.3865 us 6,575.8157 us 6,656.3124 us 6,681.9625 us 151.18 39.5833 - - 1.95 MB

Convert ByteArrayReader/PayloadData to structs

Method Mean StdDev StdErr Median Min Q1 Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 110.2227 us 8.9542 us 1.1022 us 106.0014 us 100.4409 us 103.5024 us 115.7699 us 137.6195 us 9072.55 - - - 724 B
OpenFromPoolOldSync 97.8097 us 0.8873 us 0.2372 us 97.6596 us 96.9214 us 97.0475 us 98.2952 us 99.8242 us 10223.94 - - - 556 B
OpenFromPoolNewAsync 997.6093 us 3.7960 us 1.0958 us 997.0979 us 992.6940 us 993.9077 us 1,001.2354 us 1,003.5167 us 1002.4 - - - 14.44 kB
OpenFromPoolNewSync 986.8989 us 5.5604 us 1.5422 us 986.8036 us 974.5525 us 983.2881 us 990.8644 us 994.8405 us 1013.28 - - - 2.53 kB
ExecuteScalarOldAsync 85.5045 us 0.2523 us 0.0674 us 85.4980 us 85.1024 us 85.3363 us 85.7173 us 85.9891 us 11695.29 - - - 4.03 kB
ExecuteScalarOldSync 83.7622 us 1.1974 us 0.3092 us 83.1378 us 82.4364 us 82.8596 us 84.9592 us 85.9927 us 11938.56 - - - 3.89 kB
ExecuteScalarNewAsync 123.2280 us 5.5624 us 1.2138 us 121.5542 us 116.7749 us 119.0067 us 128.1973 us 136.0250 us 8115.04 - - - 8.16 kB
ExecuteScalarNewSync 78.1873 us 0.7528 us 0.2012 us 78.1756 us 77.0330 us 77.5767 us 78.9224 us 79.4681 us 12789.8 - - - 3.07 kB
ReadBlobsOldAsync 2,393.4484 us 39.6618 us 10.6001 us 2,402.1910 us 2,302.0730 us 2,367.8660 us 2,419.5763 us 2,446.7636 us 417.81 251.5625 251.5625 251.5625 1.11 MB
ReadBlobsOldSync 2,263.5101 us 37.0520 us 9.9026 us 2,264.9530 us 2,213.8601 us 2,237.3590 us 2,272.5213 us 2,358.2117 us 441.79 244.1406 244.1406 244.1406 1.11 MB
ReadBlobsNewAsync 2,360.3801 us 37.6247 us 9.7146 us 2,359.4541 us 2,304.4333 us 2,327.1761 us 2,382.3183 us 2,421.6984 us 423.66 261.4583 261.4583 261.4583 1.13 MB
ReadBlobsNewSync 2,087.8005 us 18.4954 us 4.9431 us 2,088.8007 us 2,056.2215 us 2,069.6399 us 2,101.8354 us 2,116.6513 us 478.97 269.8864 269.8864 269.8864 1.11 MB
ManyRowsOldAsync 6,221.6735 us 51.5943 us 13.7891 us 6,213.8324 us 6,161.5104 us 6,185.8042 us 6,253.8196 us 6,344.4242 us 160.73 93.7500 - - 2.3 MB
ManyRowsOldSync 6,132.2488 us 13.1423 us 3.6450 us 6,134.6223 us 6,112.3903 us 6,118.8693 us 6,138.2833 us 6,153.8988 us 163.07 209.3750 - - 2.3 MB
ManyRowsNewAsync 5,647.4390 us 21.6905 us 5.7970 us 5,641.0039 us 5,618.9919 us 5,634.2455 us 5,664.8670 us 5,691.9604 us 177.07 78.1250 - - 1.36 MB
ManyRowsNewSync 4,930.2432 us 25.4328 us 7.0538 us 4,934.3466 us 4,897.3744 us 4,906.9485 us 4,949.1854 us 4,979.1403 us 202.83 78.1250 - - 1.32 MB

Remove GetNextSequenceNumber Func<int?>

Method Mean StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 103.8593 us 1.7662 us 0.4899 us 101.3965 us 102.6534 us 103.5631 us 104.6090 us 107.9855 us 9628.41 - - - 724 B
OpenFromPoolOldSync 102.7977 us 2.8008 us 0.7768 us 99.0552 us 101.3952 us 102.5065 us 102.7615 us 110.5062 us 9727.85 - - - 556 B
OpenFromPoolNewAsync 992.7523 us 6.6080 us 1.7062 us 978.6676 us 989.3827 us 993.6989 us 998.7139 us 999.5158 us 1007.3 - - - 14.04 kB
OpenFromPoolNewSync 980.6318 us 10.7919 us 2.7865 us 956.8521 us 975.5489 us 983.0898 us 989.6684 us 993.0683 us 1019.75 - - - 2.14 kB
ExecuteScalarOldAsync 86.6603 us 0.6861 us 0.1772 us 85.4339 us 86.1774 us 86.6874 us 87.2313 us 87.8758 us 11539.31 - - - 4.03 kB
ExecuteScalarOldSync 84.5304 us 0.9567 us 0.2470 us 83.1528 us 83.5701 us 84.7049 us 85.4966 us 85.7739 us 11830.07 - - - 3.89 kB
ExecuteScalarNewAsync 119.1620 us 2.1531 us 0.5754 us 115.8647 us 117.2991 us 119.0367 us 120.7883 us 122.2796 us 8391.94 - - - 7.78 kB
ExecuteScalarNewSync 77.8037 us 0.6436 us 0.1662 us 76.8965 us 77.1076 us 77.9869 us 78.3882 us 78.5224 us 12852.85 - - - 2.69 kB
ReadBlobsOldAsync 2,451.7432 us 35.8769 us 9.5885 us 2,390.4184 us 2,433.2327 us 2,455.0579 us 2,480.3289 us 2,501.6650 us 407.87 243.2292 243.2292 243.2292 1.11 MB
ReadBlobsOldSync 2,303.9431 us 26.4841 us 6.8382 us 2,269.0232 us 2,282.6317 us 2,308.9164 us 2,320.6464 us 2,350.8876 us 434.04 243.2292 243.2292 243.2292 1.11 MB
ReadBlobsNewAsync 2,400.4049 us 28.4905 us 7.3562 us 2,362.3808 us 2,374.6903 us 2,395.8432 us 2,427.3536 us 2,450.8135 us 416.6 253.1250 253.1250 253.1250 1.13 MB
ReadBlobsNewSync 2,150.2684 us 33.1638 us 8.5629 us 2,100.9625 us 2,121.6274 us 2,160.0017 us 2,178.1946 us 2,207.3705 us 465.06 253.1250 253.1250 253.1250 1.1 MB
ManyRowsOldAsync 6,228.2979 us 23.2140 us 6.7013 us 6,171.5077 us 6,216.0586 us 6,232.9158 us 6,242.2448 us 6,258.4468 us 160.56 217.7083 - - 2.3 MB
ManyRowsOldSync 6,109.1753 us 53.7655 us 13.8822 us 6,030.3592 us 6,061.1183 us 6,112.4643 us 6,138.9254 us 6,241.6219 us 163.69 234.3750 - - 2.3 MB
ManyRowsNewAsync 5,517.4473 us 29.0935 us 7.5119 us 5,479.5788 us 5,493.4486 us 5,508.5417 us 5,550.6916 us 5,567.9337 us 181.24 - - - 730.77 kB
ManyRowsNewSync 4,831.5297 us 25.9873 us 6.7099 us 4,792.5279 us 4,807.7310 us 4,826.8609 us 4,850.7515 us 4,876.2550 us 206.97 - - - 702.21 kB

Remove async state machine from MySqlCommand

Method Mean StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 99.3216 us 0.6524 us 0.1684 us 98.5451 us 98.8640 us 99.0433 us 99.6419 us 100.6394 us 10068.31 - - - 724 B
OpenFromPoolOldSync 97.7345 us 1.2495 us 0.3226 us 96.5588 us 96.7764 us 97.2099 us 98.6755 us 100.9542 us 10231.8 - - - 554 B
OpenFromPoolNewAsync 996.2746 us 3.1949 us 0.8249 us 991.4417 us 992.6330 us 997.1474 us 998.6744 us 1,001.4201 us 1003.74 - - - 14.02 kB
OpenFromPoolNewSync 988.6821 us 6.4043 us 1.6536 us 977.8232 us 983.2529 us 989.3665 us 994.9153 us 996.9829 us 1011.45 - - - 2.14 kB
ExecuteScalarOldAsync 87.1986 us 0.9659 us 0.2494 us 86.0057 us 86.2474 us 87.0634 us 87.8999 us 89.1942 us 11468.07 - - - 4.03 kB
ExecuteScalarOldSync 84.0800 us 0.2068 us 0.0624 us 83.7236 us 83.9603 us 84.0179 us 84.1821 us 84.4838 us 11893.44 - - - 3.89 kB
ExecuteScalarNewAsync 118.3682 us 2.6044 us 0.6961 us 115.5576 us 116.4061 us 118.0081 us 119.4911 us 125.3035 us 8448.22 - - - 7.52 kB
ExecuteScalarNewSync 76.2795 us 0.3639 us 0.0940 us 75.7448 us 75.9399 us 76.1842 us 76.6791 us 76.8989 us 13109.68 - - - 2.61 kB
ReadBlobsOldAsync 2,384.2527 us 20.3000 us 5.2414 us 2,359.6155 us 2,367.1804 us 2,382.0971 us 2,399.0666 us 2,425.6262 us 419.42 243.2292 243.2292 243.2292 1.11 MB
ReadBlobsOldSync 2,274.8724 us 33.4620 us 8.6398 us 2,238.9152 us 2,246.2762 us 2,266.0201 us 2,313.7303 us 2,327.8727 us 439.59 241.1458 241.1458 241.1458 1.11 MB
ReadBlobsNewAsync 2,349.8425 us 50.4741 us 13.0324 us 2,296.1474 us 2,306.0651 us 2,343.7934 us 2,377.6040 us 2,456.4879 us 425.56 261.4583 261.4583 261.4583 1.13 MB
ReadBlobsNewSync 2,105.4020 us 22.0626 us 5.8965 us 2,063.4144 us 2,089.7656 us 2,103.9560 us 2,119.4134 us 2,145.9387 us 474.97 246.8750 246.8750 246.8750 1.1 MB
ManyRowsOldAsync 6,184.8585 us 17.0577 us 4.4043 us 6,150.7299 us 6,171.3489 us 6,185.2828 us 6,199.9223 us 6,208.9993 us 161.69 102.0833 - - 2.3 MB
ManyRowsOldSync 6,098.0601 us 25.0416 us 6.6927 us 6,058.4741 us 6,071.7711 us 6,099.0387 us 6,113.3208 us 6,144.7488 us 163.99 234.3750 - - 2.3 MB
ManyRowsNewAsync 5,619.7634 us 27.6679 us 7.3946 us 5,591.1478 us 5,603.3314 us 5,607.6041 us 5,635.1351 us 5,682.8155 us 177.94 - - - 730.14 kB
ManyRowsNewSync 4,873.7254 us 14.7049 us 3.7968 us 4,840.7872 us 4,863.8301 us 4,872.8612 us 4,885.7916 us 4,895.4322 us 205.18 - - - 702.09 kB

Fix unnecessary reallocation in ParseAndBindParameters

Method Mean StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 99.3539 us 1.3067 us 0.3624 us 97.2300 us 98.5308 us 99.3025 us 99.8785 us 101.8850 us 10065.03 - - - 724 B
OpenFromPoolOldSync 97.6259 us 1.1878 us 0.3067 us 96.4668 us 96.8334 us 97.0672 us 98.5336 us 100.9158 us 10243.18 - - - 556 B
OpenFromPoolNewAsync 997.8679 us 3.7542 us 1.0033 us 991.6228 us 994.5576 us 997.7948 us 1,000.7456 us 1,004.4135 us 1002.14 - - - 14.04 kB
OpenFromPoolNewSync 980.4274 us 9.7583 us 2.5196 us 957.2706 us 975.2882 us 980.6984 us 987.6230 us 997.9222 us 1019.96 - - - 2.14 kB
ExecuteScalarOldAsync 84.6149 us 0.4321 us 0.1116 us 84.1179 us 84.2798 us 84.4753 us 84.9785 us 85.6613 us 11818.25 - - - 4.03 kB
ExecuteScalarOldSync 84.0466 us 0.6406 us 0.1654 us 82.8436 us 83.7023 us 84.1358 us 84.6139 us 84.9589 us 11898.17 - - - 3.89 kB
ExecuteScalarNewAsync 115.3716 us 1.1115 us 0.2971 us 114.1216 us 114.3305 us 115.2507 us 115.8096 us 117.3629 us 8667.65 - - - 7.24 kB
ExecuteScalarNewSync 76.0521 us 0.4739 us 0.1224 us 75.0759 us 75.5927 us 76.0928 us 76.4452 us 76.7166 us 13148.89 - - - 2.34 kB
ReadBlobsOldAsync 2,396.3345 us 26.0830 us 6.7346 us 2,355.4095 us 2,379.7308 us 2,391.0163 us 2,417.1750 us 2,457.9160 us 417.3 251.5625 251.5625 251.5625 1.11 MB
ReadBlobsOldSync 2,294.0036 us 11.0118 us 2.9430 us 2,278.9917 us 2,286.5336 us 2,290.7445 us 2,300.1285 us 2,318.4588 us 435.92 230.7292 230.7292 230.7292 1.11 MB
ReadBlobsNewAsync 2,341.0453 us 16.4772 us 4.4037 us 2,320.7416 us 2,332.3272 us 2,336.5598 us 2,347.2462 us 2,381.6640 us 427.16 257.2917 257.2917 257.2917 1.13 MB
ReadBlobsNewSync 2,102.4318 us 13.3078 us 3.5567 us 2,085.3167 us 2,091.7338 us 2,100.0707 us 2,112.0023 us 2,126.6807 us 475.64 253.1250 253.1250 253.1250 1.1 MB
ManyRowsOldAsync 6,154.0906 us 32.5057 us 8.3929 us 6,120.6749 us 6,129.4541 us 6,141.5047 us 6,182.1380 us 6,224.4391 us 162.49 226.0417 - - 2.3 MB
ManyRowsOldSync 6,093.5537 us 26.8114 us 7.1657 us 6,059.2888 us 6,077.7909 us 6,087.6720 us 6,113.6085 us 6,151.6208 us 164.11 213.5417 - - 2.3 MB
ManyRowsNewAsync 5,590.3994 us 6.9121 us 1.8473 us 5,576.2102 us 5,585.4933 us 5,592.1418 us 5,595.6333 us 5,599.9862 us 178.88 - - - 729.89 kB
ManyRowsNewSync 4,832.7555 us 12.5426 us 3.2385 us 4,810.7426 us 4,821.5745 us 4,837.1854 us 4,842.6196 us 4,849.4285 us 206.92 - - - 701.83 kB

This makes "OpenFromPoolNewSync" 9x faster. If the client is disconnected, SendAsync should still throw a SocketException, allowing us to detect the failed connection.
@bgrainger
Copy link
Member Author

Profiling showed that Socket.Poll called from MySqlSession.TryPingAsync was taking a very long time (on .NET Framework 4.6.2 on Windows). I believe it's unnecessary, since SendAsync would throw a SocketException anyway if the ping packet can't be sent. Thus it should be safe to remove it to speed up retrieving a connection from the pool. CC @caleblloyd as this was added in 04d6e47.

This makes OpenFromPoolNewSync 9× faster and brings it within striking distance of Connector/NET's speed (which is fast, but incorrect).

Remove Socket.Poll

Method Mean StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 101.0741 us 3.4231 us 0.8838 us 97.7706 us 98.3749 us 99.4934 us 102.7196 us 107.5990 us 9893.73 - - - 724 B
OpenFromPoolOldSync 98.9842 us 0.8873 us 0.2291 us 97.3692 us 98.4547 us 98.9911 us 99.5129 us 100.9576 us 10102.62 - - - 556 B
OpenFromPoolNewAsync 219.5575 us 2.1022 us 0.5428 us 216.6980 us 217.1674 us 219.8828 us 220.9951 us 223.4991 us 4554.62 - - - 13.9 kB
OpenFromPoolNewSync 110.4161 us 0.8551 us 0.2208 us 109.0583 us 109.7730 us 110.5957 us 111.1381 us 111.7475 us 9056.65 - - - 2.09 kB
ExecuteScalarOldAsync 86.4988 us 0.7462 us 0.1927 us 85.5811 us 85.7636 us 86.2259 us 86.9770 us 87.8109 us 11560.85 - - - 4.03 kB
ExecuteScalarOldSync 85.4677 us 0.7736 us 0.1997 us 84.5596 us 84.8161 us 85.0103 us 86.1953 us 86.8239 us 11700.32 - - - 3.89 kB
ExecuteScalarNewAsync 117.5415 us 1.4146 us 0.3781 us 115.3530 us 116.4763 us 117.6994 us 119.0677 us 119.4947 us 8507.63 - - - 7.24 kB
ExecuteScalarNewSync 77.0867 us 0.6837 us 0.1765 us 75.9772 us 76.5392 us 77.1124 us 77.4773 us 78.6687 us 12972.41 - - - 2.34 kB
ReadBlobsOldAsync 2,396.8504 us 32.8381 us 8.7764 us 2,354.0279 us 2,366.7361 us 2,398.2214 us 2,421.0742 us 2,448.3623 us 417.21 253.6458 253.6458 253.6458 1.11 MB
ReadBlobsOldSync 2,314.8435 us 66.6559 us 17.2105 us 2,255.1512 us 2,260.6382 us 2,288.8565 us 2,412.8777 us 2,420.9215 us 431.99 243.2292 243.2292 243.2292 1.11 MB
ReadBlobsNewAsync 2,396.7376 us 45.0977 us 11.6442 us 2,341.6172 us 2,364.2844 us 2,384.9837 us 2,429.2000 us 2,503.0368 us 417.23 263.5417 263.5417 263.5417 1.13 MB
ReadBlobsNewSync 2,133.9154 us 11.1289 us 2.9743 us 2,118.3441 us 2,127.2034 us 2,132.2769 us 2,140.2003 us 2,162.1642 us 468.62 251.0417 251.0417 251.0417 1.1 MB
ManyRowsOldAsync 6,208.1403 us 36.6639 us 9.7988 us 6,146.3421 us 6,188.4325 us 6,205.3172 us 6,231.3201 us 6,262.8168 us 161.08 217.7083 - - 2.3 MB
ManyRowsOldSync 6,093.7850 us 23.7225 us 6.1251 us 6,062.7670 us 6,068.5174 us 6,097.9660 us 6,112.2481 us 6,139.1491 us 164.1 226.0417 - - 2.3 MB
ManyRowsNewAsync 5,607.6547 us 12.9836 us 3.4700 us 5,591.9447 us 5,600.6688 us 5,602.8521 us 5,615.9361 us 5,638.1771 us 178.33 - - - 729.78 kB
ManyRowsNewSync 4,912.0698 us 18.7561 us 5.0128 us 4,878.1256 us 4,896.9440 us 4,911.1184 us 4,925.2241 us 4,940.8946 us 203.58 - - - 701.83 kB

@caleblloyd
Copy link
Contributor

I believe it's unnecessary, since SendAsync would throw a SocketException anyway if the ping packet can't be sent.

I think you are correct, 04d6e47 fixed #150 which was a reported SocketException: Broken Pipe. Nice elimination of a syscall

@bgrainger
Copy link
Member Author

Further reductions in allocations, particularly for OpenFromPoolNewSync.

Defer lambda creation in WritePacketAsync

Method Mean StdErr StdDev Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 104.8478 us 0.6173 us 2.3097 us 102.2868 us 103.0266 us 104.3151 us 106.6798 us 109.6558 us 9537.64 - - - 724 B
OpenFromPoolOldSync 102.7190 us 0.3662 us 1.4182 us 100.3076 us 101.6290 us 102.3373 us 104.4037 us 105.2322 us 9735.29 - - - 556 B
OpenFromPoolNewAsync 221.7716 us 1.0531 us 3.9404 us 216.9433 us 218.2437 us 222.1047 us 223.2235 us 231.5745 us 4509.14 - - - 13.91 kB
OpenFromPoolNewSync 110.8372 us 0.2899 us 1.1229 us 109.6995 us 109.7821 us 110.4491 us 111.9229 us 113.1467 us 9022.24 - - - 1.76 kB
ExecuteScalarOldAsync 87.6418 us 0.3390 us 1.2221 us 85.9753 us 86.3429 us 87.8310 us 88.3693 us 90.2102 us 11410.07 - - - 4.03 kB
ExecuteScalarOldSync 87.1490 us 0.2297 us 0.8895 us 85.7528 us 86.5908 us 86.8714 us 88.0324 us 88.4325 us 11474.6 - - - 3.89 kB
ExecuteScalarNewAsync 119.7944 us 0.5503 us 2.1312 us 116.8454 us 117.5549 us 119.6453 us 121.3513 us 123.8476 us 8347.64 - - - 7.24 kB
ExecuteScalarNewSync 77.2730 us 0.1498 us 0.5802 us 76.4362 us 76.7718 us 77.3741 us 77.5079 us 78.3833 us 12941.13 - - - 2.22 kB
ReadBlobsOldAsync 2,490.2248 us 18.9475 us 73.3835 us 2,387.6229 us 2,437.4637 us 2,473.0865 us 2,560.9259 us 2,633.3721 us 401.57 251.5625 251.5625 251.5625 1.11 MB
ReadBlobsOldSync 2,412.6695 us 14.3174 us 55.4510 us 2,343.2286 us 2,356.1040 us 2,404.9184 us 2,481.3395 us 2,493.8919 us 414.48 243.2292 243.2292 243.2292 1.11 MB
ReadBlobsNewAsync 2,388.2082 us 18.2111 us 70.5311 us 2,293.5290 us 2,342.4122 us 2,360.0827 us 2,469.3499 us 2,496.9817 us 418.72 261.4583 261.4583 261.4583 1.13 MB
ReadBlobsNewSync 2,207.3511 us 23.9013 us 104.1833 us 2,097.0952 us 2,111.7026 us 2,202.2248 us 2,239.1535 us 2,429.0595 us 453.03 246.8750 246.8750 246.8750 1.1 MB
ManyRowsOldAsync 6,266.9406 us 24.4509 us 94.6981 us 6,151.5619 us 6,177.0562 us 6,234.5971 us 6,348.8908 us 6,446.4967 us 159.57 60.4167 - - 2.3 MB
ManyRowsOldSync 6,139.7373 us 16.2782 us 60.9073 us 6,065.6914 us 6,083.7537 us 6,131.1683 us 6,161.0889 us 6,278.8282 us 162.87 188.5417 - - 2.3 MB
ManyRowsNewAsync 5,633.4473 us 6.2738 us 24.2982 us 5,605.1317 us 5,612.1376 us 5,626.5755 us 5,651.0801 us 5,688.8083 us 177.51 - - - 729.89 kB
ManyRowsNewSync 4,950.1151 us 10.8603 us 42.0618 us 4,901.5394 us 4,915.4183 us 4,928.2067 us 4,989.9264 us 5,015.3473 us 202.02 - - - 701.7 kB

Defer lambda creation in WritePayloadAsync

Method Mean StdDev StdErr Min Q1 Median Q3 Max Op/s Gen 0 Gen 1 Gen 2 Allocated
OpenFromPoolOldAsync 101.5621 us 1.2527 us 0.3474 us 99.9383 us 100.3459 us 101.3898 us 102.6836 us 103.6688 us 9846.19 - - - 724 B
OpenFromPoolOldSync 101.1201 us 1.7189 us 0.4438 us 99.4692 us 99.8130 us 100.4697 us 102.4919 us 104.9831 us 9889.23 - - - 556 B
OpenFromPoolNewAsync 222.5478 us 4.5039 us 1.2037 us 218.7838 us 219.2011 us 220.8098 us 223.2161 us 234.1453 us 4493.42 - - - 13.76 kB
OpenFromPoolNewSync 111.1235 us 1.3241 us 0.3539 us 109.3328 us 109.8421 us 111.2293 us 111.9627 us 114.1501 us 8999 - - - 1.64 kB
ExecuteScalarOldAsync 87.3579 us 0.5954 us 0.1537 us 86.2507 us 86.8695 us 87.3312 us 87.5913 us 88.5210 us 11447.16 - - - 4.03 kB
ExecuteScalarOldSync 90.7886 us 4.6671 us 0.8982 us 85.9107 us 86.9936 us 89.8564 us 92.9024 us 101.2350 us 11014.6 - - - 3.89 kB
ExecuteScalarNewAsync 121.0317 us 2.7708 us 0.7154 us 117.2415 us 118.6830 us 119.9883 us 122.7313 us 127.0767 us 8262.3 - - - 7.21 kB
ExecuteScalarNewSync 76.7388 us 0.7726 us 0.2065 us 75.6524 us 75.9686 us 76.7288 us 77.3459 us 77.9246 us 13031.21 - - - 2.18 kB
ReadBlobsOldAsync 2,480.7678 us 62.1792 us 16.0546 us 2,382.4171 us 2,422.6953 us 2,470.4444 us 2,539.9260 us 2,584.6120 us 403.1 255.7292 255.7292 255.7292 1.11 MB
ReadBlobsOldSync 2,318.6176 us 54.2126 us 13.9976 us 2,245.4053 us 2,256.6977 us 2,311.3015 us 2,368.7851 us 2,409.6222 us 431.29 245.3125 245.3125 245.3125 1.11 MB
ReadBlobsNewAsync 2,406.9200 us 57.7032 us 14.8989 us 2,305.3205 us 2,368.2017 us 2,434.7302 us 2,454.0800 us 2,476.2272 us 415.47 263.5417 263.5417 263.5417 1.13 MB
ReadBlobsNewSync 2,124.1462 us 47.9977 us 12.3930 us 2,063.3466 us 2,083.5533 us 2,094.5409 us 2,168.4831 us 2,210.8942 us 470.78 246.8750 246.8750 246.8750 1.1 MB
ManyRowsOldAsync 6,317.1649 us 141.5493 us 36.5479 us 6,167.7053 us 6,205.1953 us 6,253.6088 us 6,415.4820 us 6,617.8235 us 158.3 35.4167 - - 2.3 MB
ManyRowsOldSync 6,134.1560 us 66.2921 us 17.7173 us 6,037.5283 us 6,090.6521 us 6,129.5924 us 6,156.1199 us 6,265.5978 us 163.02 209.3750 - - 2.3 MB
ManyRowsNewAsync 5,589.2963 us 19.1113 us 5.3005 us 5,557.4460 us 5,576.1337 us 5,589.4284 us 5,603.2295 us 5,622.2173 us 178.91 - - - 729.78 kB
ManyRowsNewSync 4,877.4187 us 27.1205 us 7.5219 us 4,844.7303 us 4,854.2952 us 4,864.7399 us 4,902.5690 us 4,927.9212 us 205.03 - - - 701.7 kB

@bgrainger
Copy link
Member Author

Shipped in 0.19.0.

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.

2 participants