Open
Description
At the Division Meetup, I had a chance to chat with @noahtallen who noticed some poor performance on the Logged-out Theme Showcase.
Some highlights from the Slack conversation (linked below — please read it thoroughly!):
fetchThemeFilters
andfetchThemeData
have a high-performance impact.- It takes 400ms to fetch the
/themes
endpoint and 800ms to fetch the/theme-filters
one, with the cache helping a lot.- Reproducible via https://developer.wordpress.com/docs/api/console/.
- We could create a new endpoint to fetch both in a single call.
- It's possible that the slowness is caused by running
format_results
in Elasticsearch multiple times for themes that are returned more than once (e.g. because they belong to several filters).
The full context: p1699558844418269-slack-C05U9M2DB0D
Activity