Repository navigation
perf(uxcg): stop shipping unused data on UXCG pages - #254
Conversation
The question page carried every locale's questions three times and every locale's biases (3.1 MB of page data); the list page carried all biases it never renders (1.7 MB). Drop the unused props, send biases for the current locale only, and slim the other locales' questions to the fields search reads. Measured on the live payloads: 3.14 MB -> 0.74 MB and 1.73 MB -> 0.33 MB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @manager's task in 27s —— View job Review of #254 (perf(uxcg): stop shipping unused data)Verdict: The change looks correct. I have one style nit. What I checked
Notes
Per CLAUDE.md, this should not merge to |
| } from '@uxcore/lib/helpers'; | ||
|
|
||
| import { getStrapiBiases } from '@uxcore/api/biases'; | ||
| import { getUXCGSeo } from '@uxcore/api/mainPageSeo'; |
There was a problem hiding this comment.
This hunk rewrites the whole import block into one alphabetical list. It drops the grouped, blank-line-separated order that AGENTS.md describes, and it makes a perf PR's diff noisier. Please restore the original grouping and only add slimUXCGQuestions and remove the unused getStrapiBiases and mergeBiasesLocalization imports.
There was a problem hiding this comment.
Tried restoring the grouped order: the file as it is on main already fails simple-import-sort/imports ("Run autofix to sort these imports!"), and the pre-commit hook runs eslint --fix, so any commit touching this file re-sorts the block. The sorted order is what the repo's lint config produces; keeping it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Applied the |
|
Claude finished @manager's task in 17s —— View job Review of #254 (perf(uxcg): stop shipping unused data)Verdict: The logic is sound. One change is needed before merge: the import-order churn in Checked
To fix
Optional
Merge gate: per CLAUDE.md, merging to |
| } from '@uxcore/lib/helpers'; | ||
|
|
||
| import { getStrapiBiases } from '@uxcore/api/biases'; | ||
| import { getUXCGSeo } from '@uxcore/api/mainPageSeo'; |
There was a problem hiding this comment.
The whole import block is re-sorted into one flat list: the blank-line groups are gone and next/react moved from the top to the bottom. That has nothing to do with this perf change and breaks the grouped order the sibling pages use (see [slug].tsx). Please restore the original block and make only three edits: add slimUXCGQuestions, drop mergeBiasesLocalization, drop getStrapiBiases.
UXCG pages were the heaviest pages on the site: 3.1 MB of page data per question page and 1.7 MB on the list. With ISR rendering them on demand, a burst of requests exhausted the frontend heap.
questionsTestandquestions(never read by the page), send biases for the current locale only.biases(never read by the page).numberandaliases, the fields cross-language search reads. The current locale stays complete for the table, the modal and prev/next.Measured by applying the same trim to the live payloads: question page 3.14 MB -> 0.74 MB, list 1.73 MB -> 0.33 MB.
tsc --noEmitclean.Authorized by Wolf on 2026-10-15.
🤖 Generated with Claude Code