Bugzilla – Attachment 164027 Details for
Bug 36441
Improve performance of Item::is_bundle
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36441: Add comment explaining why replacing the DBIx call
Bug-36441-Add-comment-explaining-why-replacing-the.patch (text/plain), 863 bytes, created by
David Gustafsson
on 2024-03-27 18:36:31 UTC
(
hide
)
Description:
Bug 36441: Add comment explaining why replacing the DBIx call
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2024-03-27 18:36:31 UTC
Size:
863 bytes
patch
obsolete
>From 976288d98cc5b325dc4672a2d2be2c21287e4844 Mon Sep 17 00:00:00 2001 >From: David Gustafsson <david.gustafsson@ub.gu.se> >Date: Wed, 27 Mar 2024 19:33:06 +0100 >Subject: [PATCH] Bug 36441: Add comment explaining why replacing the DBIx call > >--- > Koha/Item.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 7d3c9c22d5c..9917911b162 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -1858,6 +1858,9 @@ Returns whether the item is a bundle or not > > sub is_bundle { > my ($self) = @_; >+ # Since this is a performance critical method >+ # and $self->bundle_items->count is rather slow >+ # replace with equivalent DBI query instead > my $memory_cache = Koha::Cache::Memory::Lite->get_instance; > my $cache_key = 'Koha::Item:is_bundle_dbi_sth'; > my $sth = $memory_cache->get_from_cache($cache_key); >-- >2.43.0
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 36441
:
164023
|
164024
|
164025
|
164026
| 164027