[Mono-dev] Patch for Mono.SqliteClient.SqliteDataReader REVIEW NEEDED
Scott Peterson
lunchtimemama at gmail.com
Sat Dec 29 15:30:13 EST 2007
Looks like gmail messed up the formatting, so here is the patch attached.
On Dec 29, 2007 3:45 AM, Scott Peterson <lunchtimemama at gmail.com> wrote:
> I'm about to look at fixing this:
> http://codicesoftware.blogspot.com/2007/11/c-mono-performance.html. I'm
> acquainting myself with the relevant files and this is an optimization I
> noticed off the bat. If someone could just make sure this is A-O.K., I'll
> go ahead and commit it. Next, if anyone who's familiar with the database
> binding code could brief me on all of the places IDataRecord and IDataReader
> are implemented, that would be great.
>
>
> Index:
> class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteDataReader.cs
> ===================================================================
> ---
> class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteDataReader.cs
> (revision 92007)
> +++
> class/Mono.Data.SqliteClient/Mono.Data.SqliteClient/SqliteDataReader.cs
> (working copy)
> @@ -65,14 +65,7 @@
> internal SqliteDataReader (SqliteCommand cmd, IntPtr pVm, int
> version)
> {
> command = cmd;
> - rows = new ArrayList ();
> - column_names_sens = new Hashtable ();
> -#if NET_2_0
> - column_names_insens = new Hashtable (
> StringComparer.InvariantCulture);
> -#else
> - column_names_insens = new Hashtable (
> CaseInsensitiveHashCodeProvider.DefaultInvariant,
> - CaseInsensitiveComparer.DefaultInvariant
> );
> -#endif
> +
> closed = false;
> current_row = -1;
> reading = true;
> @@ -147,6 +140,16 @@
> // For the first row, get the column information
> if (first) {
> first = false;
> +
> + rows = new ArrayList (pN);
> + column_names_sens = new Hashtable (pN);
> +#if NET_2_0
> + column_names_insens = new Hashtable (pN,
> StringComparer.InvariantCulture);
> +#else
> + column_names_insens = new Hashtable (pN,
> +
> CaseInsensitiveHashCodeProvider.DefaultInvariant,
> +
> CaseInsensitiveComparer.DefaultInvariant);
> +#endif
>
> if (version == 3) {
> // A decltype might be null if the type is
> unknown to sqlite.
>
--
Scott.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071229/c7bc872f/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SqliteDataReader.patch
Type: text/x-patch
Size: 1408 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071229/c7bc872f/attachment.bin
More information about the Mono-devel-list
mailing list