owid-grapher icon indicating copy to clipboard operation
owid-grapher copied to clipboard

Datapages are fetching same variable data multiple times

Open ikesau opened this issue 1 year ago • 5 comments

When loading a datapage, multiple requests are made to load the indicator metadata.

Locally, adding a console.log to Grapher.componentDidMount shows that the component is mounting three times.

image

These requests are getting cached so I don't think there's a major performance impact, but we should probably fix this. I think it's responsible for a bit of jumpiness in the loading-in animation of linecharts:

https://github.com/owid/owid-grapher/assets/11844404/ade20be4-b9e4-4450-8f48-01623dd59701

ikesau avatar Jan 10 '24 21:01 ikesau