http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10611
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19765|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <[email protected]> --- Created attachment 20273 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20273&action=edit Bug 10611: Use mysql_auto_reconnect instead of ping DBD::Mysql provides a mysql_auto_reconnect flag. Using it avoid to do a ping. Benchmarks: use Modern::Perl; use C4::Context; for ( 1 .. 1000 ) { $dbh = C4::Context->dbh; } * without this patch on a local DB: perl t.pl 0,49s user 0,02s system 98% cpu 0,525 total * without this patch on a remote DB: perl t.pl 0,52s user 0,05s system 1% cpu 37,358 total * with this patch on a local DB: perl t.pl 0,46s user 0,04s system 99% cpu 0,509 total * with this patch on a remote DB: perl t.pl 0,49s user 0,02s system 56% cpu 0,892 total Testing the auto reconnect: use Modern::Perl; use C4::Context; my $ping = $dbh->ping; say $ping; $dbh->disconnect; $ping = $dbh->ping; say $ping; -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
