Re: [CDBI] Make CDBI go fast
Tim Bunce <[email protected]> Sun, 22 Apr 2007 10:57:01 +0100
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Apr 20, 2007 at 12:04:40PM -0400, John Siracusa wrote:
>
> You can see how much faster plain DBI is than any ORM by including it
> in the benchmark. Example here:
>
> http://rose.sourceforge.net/wiki/index.php/RDBO/Benchmark/DBI
Speaking of DBI speed...
A belated Christmas present for all you speed demons:
I've moved some of the DBI handle creation code from Perl to C
for DBI 1.55 (not yet released).
That's reduced the cost of handle creation by ~20%, as measured by
$dbh->prepare("") while (--$i); # dbh is connected to "dbi:NullP:"
I've also changed how the CachedKids attribute is handled so
connect_cached and prepare_cached no longer need to call FETCH('CachedKids').
Some similar benchmarks showed ~5% gain for connect_cached and ~30%
gain for prepare_cached. (The smaller change for connect_cached is
probably due to the relative cost of the ping() that connect_cached does.)
[This last change still needs some work to avoid forcing people to
recompile their drivers. Hopefully.]
Tim.
p.s. You can thank Shopzilla.com for this.