Optimise graph widgets in iframe

Hi Matomo Team,

We currently have a page on our website that calls our Matomo instance to retrieve an embedded Matomo widget to display a graph of views based on the pageTitle segment like the URL below.
Depending on the views over time and the date range, this graph can take quite a long time to load initially (sometimes up to 30 seconds), so I was wondering if Matomo had the ability to pre-process or cache this type of data so the loading to the end user is quicker?

https://dev.matomo.com/index.php?module=Widgetize&action=iframe&forceView=1&viewDataTable=graphEvolution&disableLink=1&widget=1&moduleToWidgetize=VisitsSummary&actionToWidgetize=getEvolutionGraph&idSite=405&period=range&date=2021-10-12,2022-03-20&disableLink=1&widget=1&segment=pageTitle%3D%3Dorganisation_id%253A%2520C4HV4jx%252C%2520homepage_id%253A%2520fbvVp7x&token_auth=xyz

When setting up we followed the Configuring Matomo for speed document and have had auto-archiving enabled since we first set up the Matomo instance; however fetching data can still take quite a long time on the first load - specifically embedded graph widgets.

Thank you for your help

If you avoid using date range or not terminated periods (instead, use only full days, full weeks, full months, or full years) or segments that are not registered in Matomo, you will be able to speed-up the widget display. Indeed, its data will be preprocessed by the archiving process…