[Koha-bugs] [Bug 15107] Batch Patron Deletion (Trash) Performance Improvement

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Nov 16 12:49:20 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15107

--- Comment #3 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Comment on attachment 44447
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44447
Bug 15107: Batch Patron Deletion (Trash) Performance Improvement

Review of attachment 44447:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=15107&attachment=44447)
-----------------------------------------------------------------

Great to see someone working on performance!

I realise that dropping DBIC, especially in background scripts where a startup
cost is clearly a bad thing, does lead to a performance increase but I am a
little apprehensive to do an about turn on dbic's use as it's only jsut picking
up momentum in the project as a whole.  i wonder if there is a dbic friendly
way to improve performance rather than just ditching it?

::: C4/Members.pm
@@ +1772,3 @@
>  =cut
>  
>  sub MoveMemberToDeleted {

Seems you've highlighted a bad API choice here (not your fault). This sub does
not 'Move' at all.. it 'Copies'!

I would prefer to see it actually do a 'Move', i.e. do the insert from select,
followed by a delete wrapped in a transaction.

Would you be willing to look into this as part of this piece?

@@ +1773,5 @@
>  
>  sub MoveMemberToDeleted {
> +    my ($borrowernumber) = shift or return;
> +    my $dbh = C4::Context->dbh;
> +    my $borrower_columns = q{

I'm not especially happy with adding a list of fields here, it means increased
maintenance cost going forward as would require this script to be altered upon
any db change on this table.

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


More information about the Koha-bugs mailing list