Yep. That's what we did. I'd attach it but it's a 500kB png the forum seems limited to 100 kB.
It looks like most of the time is coming via:
filer_activity_names -> filter_phrases
So we turned off activity name autolinking as described at https://docs.moodle.org/29/en/Activity_names_auto-linking_filter. That brings the page load time back under 5 seconds or so.
So now the question is - why does enabling activity name autolinking cause such a huge performance hit - especially on pages where it isn't even really necessary (e.g. while viewing/modifying submission grades)? Is there any way to fix that? We have a number of instructors who use that feature for assignment descriptions and other user-generated content, so I'd prefer to to have to keep it disabled permanently.