Bug 40741

Summary: OPAC searches for records with many items are very slow
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: SearchingAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Lucas Gass (lukeg) 2025-09-02 17:42:34 UTC
I tested in k-t-d, with default data. I brought my k-t-d up with the es7 option. 


When you have a results page with multiple records having many items on it searches become too slow on the OPAC:

On the staff interface: 
1 records w/ 1000 items: 1300ms
2 records w/ 1000 items: 1701ms
3 records w/ 1000 items: 2023ms 
4 records w/ 1000 items: 2344ms
5 records w/ 1000 items: 2700ms
6 records w/ 1000 items: 2909ms
7 records w/ 1000 items: 3217ms
8 records w/ 1000 items: 3625ms

These are all pretty reasonable given the large number of items.


OPAC:
0 records w/ 1000 items: 2102ms
1 records w/ 1000 items: 12415ms
2 records w/ 1000 items: 23250ms
3 records w/ 1000 items: 34216ms

I stopped at 3 because 34216 is already too slow.
Comment 1 Lucas Gass (lukeg) 2025-09-02 17:51:05 UTC

*** This bug has been marked as a duplicate of bug 38181 ***