Facia: Decommission `/lite.json` endpoint & `renderFrontJsonMinimal()`, reduce memory consumption
rtyley opened this issue · 4 comments
See #26338 (comment) - back in November 2017, #18364 & #18365 introduced the /lite.json
representation of fronts:
Lines 36 to 39 in 8bc978e
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.
We should pull this into our next health sprint
Steps:
- Create 0% test that stops using
lite
versions of fronts #27389 - Check fronts still work correctly, then set experiment to 1%. #27435
- Check metrics (what are we looking for?), then set experiment to 20% (10% or 50% also options).
- Check metrics, then remove experiment and stop using
lite
versions of fronts - Removed unused code and refactor
Cannot find any metrics for users in the 1% test: https://logs.gutools.co.uk/s/dotcom/goto/7f66b430-65e8-11ef-9afb-57c59e22107a
UPDATE: I had forgot to switch the test on! https://frontend.gutools.co.uk/dev/switchboard
Test switched on at 11:30am 3/9/24