Skip to content

Strip commercial tag properties for DCR tag pages - #28964

Draft
jorgeazevedo wants to merge 1 commit into
mainfrom
ja-strip-commercial-tag-pages
Draft

Strip commercial tag properties for DCR tag pages#28964
jorgeazevedo wants to merge 1 commit into
mainfrom
ja-strip-commercial-tag-pages

Conversation

@jorgeazevedo

@jorgeazevedo jorgeazevedo commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What does this change?

Applies withoutCommercial stripping to the tag pages DCR endpoint, mirroring what was done for fronts in #27894

Taking the response from https://www.theguardian.com/tone/minutebyminute.json?dcr=true as an example. Every tag instance inside contents[].properties.maybeContent.tags.tags[].properties is mapped to the DCR type FETagType, which defines a number of tag properties(id, tagType, webTitle, sectionId, paidContentType, podcast) but does not include commercial, even thought commercial is part of the JSON.

What this mean is that commercial is sent by Frontend but silently discarded by DCR on deserialisation. Removing it drops the payload from ~800KB to ~457KB and the resulting HTML from DCR is byte-for-byte identical with and without the commercial data.

How has this change been tested?

Have we considered potential risks?

@jorgeazevedo jorgeazevedo added performance maintenance Departmental tracking: maintenance work, not a fix or a feature labels Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@jorgeazevedo

jorgeazevedo commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

There are other properties from tags that are unused

The largest ones are

contents.*.properties.maybeContent.tags.tags.*.properties.bio
contents.*.properties.maybeContent.tags.tags.*.properties.url

And the rest are

contents.*.properties.maybeContent.tags.tags.*.properties.contributorLargeImagePath
contents.*.properties.maybeContent.tags.tags.*.properties.sectionName
contents.*.properties.maybeContent.tags.tags.*.properties.bylineImageUrl
contents.*.properties.maybeContent.tags.tags.*.properties.references

I think it'd be worth exploring removing these ones as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant