simorgh icon indicating copy to clipboard operation
simorgh copied to clipboard

Reduce the amount of data/props we send to page components

Open jroebu14 opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe. If you look at view-source:https://www.bbc.com/japanese and look at the window.SIMORGH_DATA json you will see this resembles a lot of the data fetched from Ares which is roughly 65kb in total for this page. This is for the React SPA hydration on the client which is the data created in getInitialData in each route.

There is potential for page weight savings by plucking out only the data we need before sending to the page component.

Describe the solution you'd like We should not over-provide our page components with data.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Testing notes [Tester to complete]

Dev insight: Will Cypress tests be required or are unit tests sufficient? Will there be any potential regression? etc

  • [ ] This feature is expected to need manual testing.

Additional context Similar issues: https://github.com/bbc/simorgh/issues/4476 https://github.com/bbc/simorgh/issues/3962 https://github.com/bbc/simorgh/issues/3003

jroebu14 avatar Jul 06 '20 13:07 jroebu14