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

--- Comment #67 from Marcel de Rooy <[email protected]> ---
(In reply to Jonathan Druart from comment #66)
> +        my $consent = Koha::Patron::Consents->search({
> +            borrowernumber => getborrowernumber($user),
> +            type => 'GDPR_PROCESSING',
> +            given_on => { '!=', undef },
> +        })->next;
> +        if( !$consent ) {
> 
> 
> ->count could have been better.

I tested that assumption a bit. And it seems not to be true in terms of
performance at least?
In short:
1.3480 sec for 1000 counts and 0.0094 for 1000 next's (on 1000 records).
It seems that DBIx goes to the db for each count but the repeated nexts are
handled much more efficiently (cache, prefetch, ..)?

Script fragment on next comment.

-- 
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/

Reply via email to