[Bug 25457] New: The ViewPolicy filter should cache the MARC framework structure
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Bug ID: 25457 Summary: The ViewPolicy filter should cache the MARC framework structure Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org If a record processor is to be used inside a loop (as in searchResults on bug 24458) it should not retrieve the frameworks information on each call. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24458 Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104712&action=edit Bug 25457: Regression tests This patch implements tests on the ViewPolicy RecordProcessor filter, to assess it caches the calculated MARC subfield structure between calls. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 104713 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104713&action=edit Bug 25457: Make ViewPolicy cache MARC frameworks This patch implements an implicit cache of the calculated MARC subfield structures on each use of the filter. Moreover, if different frameworks are set between calls (using $processor->options) all of them are cached. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t => FAIL: The ViewPolicy filter doesn't cache anything 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104712|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 104836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104836&action=edit Bug 25457: Regression tests This patch implements tests on the ViewPolicy RecordProcessor filter, to assess it caches the calculated MARC subfield structure between calls. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104713|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 104837 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104837&action=edit Bug 25457: Make ViewPolicy cache MARC frameworks This patch implements an implicit cache of the calculated MARC subfield structures on each use of the filter. Moreover, if different frameworks are set between calls (using $processor->options) all of them are cached. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/Filter_MARC_ViewPolicy.t => FAIL: The ViewPolicy filter doesn't cache anything 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_20_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Keywords|rel_20_05_candidate |rel_20_11_target -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24458 See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24458 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24458 [Bug 24458] Search results don't use Koha::Filter::MARC::ViewPolicy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I don't see how it could be useful, you are calling GetMarcStructure that is doing exactly that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #5)
I don't see how it could be useful, you are calling GetMarcStructure that is doing exactly that.
Is it storing the structure in L1? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- yes of course. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WORKSFORME Status|Signed Off |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25457 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_11_target | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org