mozilla-frontend-infra/firefox-performance-dashboards

Too many duplicated requests

Closed this issue · 5 comments

The following screenshot shows duplicated requests to TREEHERDER/api/opencollectionhash on initial page load. Same request is sent on each parameter change in UI. Ideally, should be done only once at page load.
image

I'm aware of that. It's part of making each graph be independent.
It would be ideal if there was a way to cache this request for the session since the response barely changes.

Caching: We can use the Cache API
Shouldn't that request be called once and that data be passed as a prop to PerferhderGraph (instead of going the network caching way)

Also, are there any plans to lazy load charts data? Like instead of rendering all the charts at once, only fetch and render data for "present chart"? I can create a different design if you would like... unless users are expecting seeing all charts at once.
Something like this maybe? https://codepen.io/sidvishnoi/full/jOOMqdd

I thought I had solved the problem and the charts would load as some of their data would become available.
However, you're right. When I load the page with regular 3G network I can see the headers for each graph load:
image
but I don't see the graph itself plotted until all graphs are ready.

The users want to see all charts at once so they can scroll through them.

FYI this call is also repeated multiple times:
https://treeherder.mozilla.org/api/project/mozilla-central/performance/signatures/?framework=10&platform=windows10-64-shippable&subtests=0

I'm grateful for your help. I'm already learning about the Cache API which I had not yet discovered.

Would you say we can close this?

Sure!
Closes via #233