Bug #50902 Performance improvement in Connector/NET
Submitted: 4 Feb 2010 8:43 Modified: 4 Feb 2010 18:10
Reporter: Bogdan Degtyariov Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.2 OS:Any
Assigned to: Bogdan Degtyariov CPU Architecture:Any
Tags: GetBytes
Triage: D3 (Medium)

[4 Feb 2010 8:43] Bogdan Degtyariov
Description:
MySqlDataReader.GetBytes() method in Connector/NET 6.2 is still using the expensive "is" type comparison:

if (val is MySqlBinary)
 ...

Sometimes this can be the bottleneck that slows down the results processing up to 15%.

How to repeat:
Call MySqlDataReader.GetBytes()

Suggested fix:
See the attached .diff file
[4 Feb 2010 8:45] Bogdan Degtyariov
"is" comparison replaced with "=="

Attachment: perf_patch.diff (text/x-diff), 780 bytes.