[Bug 12347] New: Search performance improvements
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 Bug ID: 12347 Summary: Search performance improvements Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org As-of code introduced by bug 11096, the current C4::Search::getRecords and C4::Search::searchResults code creates MARC::Record objects for search results twice. This makes searching slower than before. Code should be refactored in order to create the MARC::Record objects for the first time, and reuse it afterwards. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 28623 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28623&action=edit Bug 12347: Performance improvements in Search.pm Short: some costly stuff is done twice, this patch refactors that to make it more reasonable. Long: Bug 11096 introduced a noticeable overhead to the facet building stage of the getRecords code. This patch leverages it by propagating the MARC::Record objects created upon facet building, and reusing them in the C4::Search::searchResults function. To test: - Search for a term on master - Apply the patch - Same results Unit tests reflecting API change in a separate patch. Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 28627 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28627&action=edit Bug 12347: Unit tests should be updated to new API This patch updates t/db_dependent/Search.t to acknowledge the API change. Now getRecords returns MARC::Record objects and thus there's no need to have separate DOM and GRS-1 test cases (at least for it). To test: - Apply both bug's patches - Run prove -v t/db_dependent/Search.t => SUCCESS: all tests pass Best regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #28623|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 28628 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28628&action=edit Bug 12347: Performance improvements in Search.pm Short: some costly stuff is done twice, this patch refactors that to make it more reasonable. Long: Bug 11096 introduced a noticeable overhead to the facet building stage of the getRecords code. This patch leverages it by propagating the MARC::Record objects created upon facet building, and reusing them in the C4::Search::searchResults function. To test: - Search for a term on master - Apply the patch - Same results Unit tests reflecting API change in a separate patch. Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr, | |tomascohen@gmail.com Depends on| |11096 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- The hypothesis is wrong in the formulation of the patch, as the MARC::Record objects are not built for all the result set in searchResults. As a consequence the speed improvement is really small. The only way to improve this is by reverting the facet calcultation algorithm, or finishing the works on bug 11232. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12788 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high Severity|enhancement |critical --- Comment #5 from Frédéric Demians <frederic@tamil.fr> --- I've increased bug's importance. OPAC response time under few seconds (2-3-4?...) is critical. Some would disagree -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 --- Comment #6 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to Tomás Cohen Arazi from comment #4)
The hypothesis is wrong in the formulation of the patch, as the MARC::Record objects are not built for all the result set in searchResults. As a consequence the speed improvement is really small.
The only way to improve this is by reverting the facet calcultation algorithm, or finishing the works on bug 11232.
bug 11232 is pushed master, makes this bug obsolete ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12347 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |INVALID --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I think this bug should be closed, and more precise ones should be filled, like: "We shouldn't create MARC::Record objects out of MARCXML, use the XSLTs instead" The bug title is also wrong, as it sounds like an omnibus bug instead of a real one. I'm closing it, so we fill new ones for specific things we could improve (because I agree with Frederic). -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org