Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facia: Decommission /lite.json endpoint & renderFrontJsonMinimal(), reduce memory consumption #27143

Open
rtyley opened this issue May 14, 2024 · 1 comment
Milestone

Comments

@rtyley
Copy link
Member

rtyley commented May 14, 2024

See #26338 (comment) - back in November 2017, #18364 & #18365 introduced the /lite.json representation of fronts:

GET /*path/lite.json controllers.FaciaController.renderFrontJsonMinimal(path)
GET /*path.emailjson controllers.FaciaController.renderFrontJson(path)
GET /*path.emailtxt controllers.FaciaController.renderFrontJson(path)
GET /*path.json controllers.FaciaController.renderFrontJson(path)

The lite.json versions are actually not significantly smaller:

% aws --profile frontend s3 ls s3://aws-frontend-store/PROD/frontsapi/pressed/live/uk/fapi/
2024-05-14 12:38:40     501886 pressed.v2.adfree.json
2024-05-14 12:38:39     508012 pressed.v2.json
2024-05-14 12:38:40     352779 pressed.v2.lite.adfree.json
2024-05-14 12:38:39     358778 pressed.v2.lite.json

...and having 2 versions actually takes up additional memory that we could free up. Consequently I believe the the 'lite' versions should be completely removed.

Things to check...

See if the output of the endpoints that use the 'lite' versions (renderFrontHeadline(), renderFrontPressResult() & renderFrontJsonMinimal()) stays the same, depending whether they perform their own trimming that will work on the full versions of PressedPage, or if were relying on the trimmed nature of the 'lite' version at all.

@alinaboghiu
Copy link
Member

We should pull this into our next health sprint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Next Sprint
Development

No branches or pull requests

3 participants