Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 45578
Status: resolved
Priority: 0/
Queue: DBD-SQLite

Owner: Nobody in particular
Requestors: gfuji [...]

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)

Subject: A patch to small improvement (not a bug report)
Download (untitled) / with headers
text/plain 1.2k
Hi, Congrat to release a new version. I have been waiting for it. And I have written a patch for dbdimp.c to improve performance and readability. This patch includes: * DBI provides its own ppport.h but it too old to use a new useful APIs. Use a new ppport.h and remove some macros. * Fast perl collations in C, instead of sub{ $_[0] cmp $_[1] } in Perl. Anyway, it is implemented by sv_cmp()/sv_cmp_locale(). * Remove some unnecessary codes: av_undef(imp_dbh->functions), sqlite_quote(), etc. * call_sv() with G_SCALAR or G_VOID always returns 1. pp_entersub()/pp_leavesub()/pp_return() adjust return values unless called in list context. Changed to assert(retval == 1) currently, but it might be removed. * "sv_2mortal(newRV(sv_2mortal((SV*)av)))" is the same as "sv_2mortal(newRV_noinc((SV*)av))". The latter is always faster and easy to understand. * Calls AGGREGATOR->step() in void context. * Use form()/Perl_form(), instead of sqlite3_snprintf(). It's an useful utility function. * The attribute "unicode" is not a standard attribute, so it should be renamed. I have proposed a new name, "sqlite_unicode". I'll happy if I contribute this distribution. Regards, -- Goro Fuji (gfx) GFUJI at
text/x-diff 696b
--- 2009-04-23 19:12:05.000000000 +0900 +++ 2009-04-30 09:18:38.025376000 +0900 @@ -95,11 +95,6 @@ # Hand off to the actual login function DBD::SQLite::db::_login($dbh, $real, $user, $auth) or return undef; - # Install perl collations - my $perl_collation = sub { $_[0] cmp $_[1] }; - my $perl_locale_collation = sub { use locale; $_[0] cmp $_[1] }; - $dbh->func( "perl", $perl_collation, "create_collation" ); - $dbh->func( "perllocale", $perl_locale_collation, "create_collation" ); # HACK: Since PrintWarn = 0 doesn't seem to actually prevent warnings # in DBD::SQLite we set Warn to false if PrintWarn is false.
Subject: dbdimp.c.patch
Download dbdimp.c.patch
text/x-diff 20.3k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 125b
I missed a segment in paches. Re-attached a new diff file (DBD-SQLite.patch). Regards, -- Goro Fuji (gfx) GFUJI at
Download DBD-SQLite.patch
text/x-diff 21.7k

Message body is not shown because it is too large.

Download (untitled) / with headers
text/plain 258b
A small note to whoever of the C-skillz group applies this. We may not necesarily want all of the elements of this patch merged in, recommend we merge the obviously harmless stuff and leave the more edgy stuff to be discussed on the mailing list or channel.
Download (untitled) / with headers
text/plain 346b
Applied some, and pended some. We are not ready for micro-optimization (at least not in the mood right now). Especially so for func-related stuff as it's likely to be refactored when the next DBI is out (see #44871 and #44882). Anyway, please split your next patches into smaller pieces to make it easier for us to take them or leave them :)
Closed this ticket as the most useful part has already been included. Thanks.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to