[CDBI] Make CDBI go fast
Tim.Bunce at pobox.com
Sun Apr 22 10:57:01 BST 2007
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:
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.]
p.s. You can thank Shopzilla.com for this.
More information about the ClassDBI