Recently, while investigating slow loading time (around 30 seconds) of a Moodle 3.7 installation, I observed that the issue resolves immediately zipping to sub-second load time after disabling the glossary auto-linking filter.
Upon further investigation, here are some more findings:
There is a glossary contains more than 3000 entries and is a global glossary;
The cache hit ratio is high indicating that this is not a caching issue;
Turning on Performance Info revealed that there are a lot of content items being reported as being filtered;
These seem to be associated with the Adaptable theme and Campus (requiring bootstrap-base) - this happens even when themes are installed but are not the current theme - uninstalling these themes resolves the issue
This is happening even on the admin pages which do not have text for content items
I feel that this is a bug because even the admin pages which do not have any text to be filtered are loading in 30 seconds.
Hope the information provided above is useful for others including developers resolving the issue.