-
Improvement
-
Resolution: Fixed
-
Normal
-
None
-
None
-
None
On at least 6/22, 6/29, and 7/6, we've had load issues on floyd due to some app that's been requesting every VA release via the the web service. Here's an example of one such query, directly from the nginx logs:
Our method of pagination, which maps the limit/offset parameters here nearly directly to LIMIT/OFFSET in SQL, is known to be slow, especially with high offsets. But Data::Release::find_by_artist seems to be especially slow due to it having to sort the results by release date and country name. I'd suggest modifying the find_by_artist query to only sort by name to help resolve those performance issues somewhat.
In addition to the web service, this would change the order on artists' Releases tab. While you can still browse an artist's discography chronologically via the overview, I'd suggest we add options for filtering by date/country to this tab to make up for the lost ordering. Longer-term we'll need to add appropriate materialized tables and indexes to allow fast pagination and sorting here.