[Koha-bugs] [Bug 16156] Do not ensure the dbh is connected all the time

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 29 15:14:07 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16156

--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 49632
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49632&action=edit
Bug 16156: Do not ensure the dbh is connected all the time

I have profiled `/catalogue/search.pl?q=d` (20 results, xslt) and found
that at least 600ms are spent in
DBIx::Class::Storage::DBI::ensure_connected, which is called 5749 times
(almost 1 per query).
Ideally we could work on the basis that the connection is only checked
when a thread is started. This is what does this patch.
Unfortunately this patch will revive timeout issues with long run
process (SIP server for instance).

Before this patch:
901398 statements and 346866 subroutine calls in 406 source files and 55
string evals
spent 637ms (33.0+604) within
DBIx::Class::Storage::DBI::ensure_connected which was called 5749 times,
avg 111µs/call

After this patch:
817161 statements and 265940 subroutine calls in 406 source files and 55
string evals
spent 49.8ms (6.58+43.2) within
DBIx::Class::Storage::DBI::ensure_connected which was called 343 times,
avg 145µs/call

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list