Reading lot of string values from database (fetching string values) performance is poor
---------------------------------------------------------------------------------------
Key: DNET-579
URL: http://tracker.firebirdsql.org/browse/DNET-579
Project: .NET Data provider
Issue Type: Improvement
Components: ADO.NET Provider
Affects Versions: 4.5.0.0
Environment: Any
Reporter: Toni Martir
Assignee: Jiri Cincura
When fetching rows, reading string column values calls public static Charset GetCharset(string charsetName)
Replacing the sequential search with a dictionary there is a 80% performance gain when reading strings:
private static Dictionary<string, Charset> supportedCharsetsNames;
public static Charset GetCharset(string charsetName)
{
return supportedCharsetsNames[charsetName];
}
And inside InitializeSupportedCharsets:
supportedCharsetsNames = new Dictionary<string, Charset>();
foreach (Charset ncharset in charsets)
{
supportedCharsetsNames.Add(ncharset.name, ncharset);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|