The purchase suggestion management page take anywhere between 15-45 seconds to load if there are several hundred items in the suggestions table.
For testing purposes in koha-testing-docker I wrote this. Definitely DO NOT add this to a production server: $('body').append('<button id="makeSuggestions">Make 100 suggestions</button>'); $('#makeSuggestions').click( function() { for (let i = 0; i < 100; i++) { let branches = ["CPL", "FFL","FPL","FRL","IPT","LPL","MPL","PVL","RPL","SPL","TPL","UPL"]; let random_branch = Math.floor(Math.random() * branches.length); let statuses = ["ASKED", "ACCEPTED", "REJECTED"]; let random_status = Math.floor(Math.random() * statuses.length); let random_title = (Math.random() + 1).toString(36).substring(2); $.ajax({ url: '/api/v1/suggestions', method: 'POST', data: JSON.stringify({ "title": random_title, "item_type": "BK", "suggested_by": Math.floor(Math.random() * 51), "suggestion_date": "2023-04-06", "timestamp": "2023-04-06T17:59:26+00:00", "managed_by": 51, "library_id": branches[random_branch], "status": statuses[random_status], }), contentType: 'application/json', success: function(result) { console.log('suggestion added'); }, }); } });
Ultimately these tables probably need to be coming for the REST API?
Would it be possible to have batch changes made by queuing them, like we have for batch item modification? So we could continue to work on other purchase suggestions while the last set of edits are updating? I find it grinds particularly badly when I'm trying to update several records from a page to assign a manager to them.
This is very slow on our system too. Hopefully there is a good solution for it soon.
Fayetteville Public Library cosigning the need for this fix -- the slow load times are making it very difficult to work through these purchase suggestions.
This is a challenge at our library as well. The purchase suggestion management page takes a long time to load, and it also takes a long time to save changes made to a purchase suggestion (such as changing the status to "Accepted" or "Ordered").
We are experiencing this as well, with just over 400 items between the Accepted, Checked, and Rejected tabs. The pages can take 10+ seconds, and at times even longer to load. We also suspect this is related to an issue that, after modifying a suggestion, the page returns to the suggestions list, but never fully loads the table of suggestions (We cannot conclusively prove this is related at this point, but are trying to narrow this down)
*** Bug 27183 has been marked as a duplicate of this bug. ***
Looks like Bug 27183 is a duplicate of this one. We load all the suggestions each time visiting the page. As Michal pointed out, API pagination can solve this. Not easy though. :)
Is Bug 31024 also a duplicate of this one? We have massively configured Suggestions Management with 5 additional SUGGEST_STATUS (and tweaks to the default ones). We have added various notices so we offer both centralised and college-based Suggestions Management using very different workflows. The feature is now widely used by many staff and it would be great to have the page draw quickly.
The move to REST is the ultimate fix, but could we improve performance otherwise too? How are we doing with indexes on the table and the like, are there some easy improvements we could make here? If not, I think marking as duplicate would be the next logical step.