Summary: | Optimize Koha::Items->filter_by_for_hold for search | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Searching | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | ||
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38868 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: |
Description
David Cook
2025-01-13 03:22:49 UTC
The total execution time for Koha::Items->filter_by_for_hold() seems to be about .003-.004. Even across 437 items (ie koha-testing-docker with numSearchResults set to 1000 and doing a * search with Elastic), that's only 1.3 seconds lost to .003*437. Total script execution time was 16.88 seconds. But then if I look at all the system calls through that search... they're all tiny. It's how they all add up. If I change numSearchResults to 100, I get my search results in 5 seconds. If I change numSearchResults to 20, I get my search results in 1.3 seconds. It would be interesting to look at the execution times of search_compat() and searchResults() since those are the two functions that appear to take $results_per_page as arguments. Note that Koha::Items->filter_by_for_hold() is just one of many functions called in searchResults(). Anyway, work day well past done... |