Inserting logging into the service method seems to show a significant slowdown as the data is prepared for return to the browser, which suggests possible memory/GC issues. Worth investigating whether increasing the heap size in the grails config will solve this, or whether more digging is needed.
Did some digging, and it turned out to be just inefficient use of the orm. Refactored, and the time to download a 384 well plate went from 90s to 1.5s.
Inserting logging into the service method seems to show a significant slowdown as the data is prepared for return to the browser, which suggests possible memory/GC issues. Worth investigating whether increasing the heap size in the grails config will solve this, or whether more digging is needed.