Bugzilla – Attachment 53214 Details for
Bug 16076
DBIx searches - performance issues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16076 - DBIx searches - performance issues
Bug-16076---DBIx-searches---performance-issues.patch (text/plain), 1.03 KB, created by
Jacek Ablewicz
on 2016-07-08 09:51:41 UTC
(
hide
)
Description:
Bug 16076 - DBIx searches - performance issues
Filename:
MIME Type:
Creator:
Jacek Ablewicz
Created:
2016-07-08 09:51:41 UTC
Size:
1.03 KB
patch
obsolete
>From baf09cb84df31d557a993d531d82a766e3fbe8b7 Mon Sep 17 00:00:00 2001 >From: Jacek Ablewicz <abl@biblos.pk.edu.pl> >Date: Fri, 8 Jul 2016 11:39:02 +0200 >Subject: [PATCH] Bug 16076 - DBIx searches - performance issues > >Experimental method Koha::Objects->search_all_unblessed() >added for testing an impact of DBIx::Class::ResultClass::HashRefInflator >on search performance. >--- > Koha/Objects.pm | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/Koha/Objects.pm b/Koha/Objects.pm >index 6c03ff5..e2f2f3e 100644 >--- a/Koha/Objects.pm >+++ b/Koha/Objects.pm >@@ -130,6 +130,17 @@ sub search { > } > } > >+sub search_all_unblessed { >+ my ( $self, $params, $attributes ) = @_; >+ >+ my $newattr = $attributes? { (%$attributes) }: {}; >+ $attributes->{result_class} = 'DBIx::Class::ResultClass::HashRefInflator'; >+ my @results = $self->_resultset()->search($params, $attributes); >+ @results == 1 && !($results[0]) && return; >+ >+ \@results; >+} >+ > =head3 Koha::Objects->count(); > > my @objects = Koha::Objects->count($params); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16076
: 53214 |
53215