[Koha-bugs] [Bug 10611] C4::Context->dbh checks if the DB is still running
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sun Oct 20 21:39:40 CEST 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10611
Paul Poulain <paul.poulain at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
QA Contact|testopia at bugs.koha-communit |paul.poulain at biblibre.com
|y.org |
--- Comment #17 from Paul Poulain <paul.poulain at biblibre.com> ---
I made some tests with NYTProf, on opac-main.pl
* without the patch
if (defined($context->{"dbh"}) && $context->{"dbh"}->ping()) {
# spent 13.5ms making 120 calls to DBI::db::ping, avg 112µs/call
=> 120 pings are sent to mysql
* with the patch
121 1.10ms if ( defined $db_driver && $db_driver eq 'mysql' &&
$context->{"dbh"} ) {
return $context->{"dbh"};
} elsif ( defined $db_driver && defined($context->{"dbh"}) &&
$context->{"dbh"}->ping()) {
return $context->{"dbh"};
}
=> no pings sent, even if the 120 calls are still here.
We spent on ly 1.10ms instead of 13.5 in those checks. And the lag will be much
larger in case of a "slow" network mySQL
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list