Files
tech-log-frontend/config/scale/feature-shape-ceilings.json
T
DongHyeonka 7558a8f495 build(perf): 초기 JS 예산을 TechLog 측정값으로 225 KiB에 둔다
문제
예산 204,800 B는 템플릿을 받을 때의 기본값이다. TechLog는 기능을
붙인 뒤 예산을 다시 정하지 않았다(템플릿 문서는 첫 기능을 추가하기
전에 정하라고 한다). 앞 커밋들로 초기 JS를 300,869 B에서 229,224 B로
줄였지만, 템플릿 공통 부분(react-dom·react-router·zod·tanstack·플랫폼
src)만 약 205 KB여서 TechLog 코드를 모두 빼도 204,800 B 안에 들지
않는다.

고른 방법
- 템플릿 규칙(1106/15-01, 결정 D9)을 그대로 쓴다. CI env 측정값에
  기능 하나의 상한 1 KiB를 더해 KiB 단위로 올린다. 229,224 + 1,024 =
  230,248 B → 225 KiB = 230,400 B. 여유 1,176 B는 기능 하나와 올림
  몫이다.
- docs/operations/performance-evidence.md에 전후 수치, 뺀 것, 204,800 B로
  돌아가지 못한 이유, 다시 볼 조건과 되돌림 규칙을 적는다.
  feature-shape-ceilings.json의 예산 언급도 맞춘다.

버린 대안
- 남은 TechLog 몫(문구 catalog 약 7.5 KB, 공개 HTTP gateway·mapping 약
  6.7 KB, Studio·관리·공개 계약 약 6.6 KB, 모듈 단독 gzip)을 더 빼기.
  문구와 계약은 부팅 때 합쳐 검증하는 구조라, 템플릿 15-01(기능 실행부를
  라우트 진입 때 적재)을 옮기는 템플릿 동기화 일이다. 공개 gateway는
  첫 화면 데이터 요청에 쓰인다.

위험·한계
- 예산이 템플릿보다 23,552 B 크다. 템플릿 동기화로 15-01을 받으면 다시
  재고 같은 규칙으로 내린다. 측정값이 203,776 B 이하이면 200 KiB로
  돌아간다.

검증
- desktop CI env(CI=true, VITE_BUILD_ID, RELEASE_ID, VITE_COMMIT_SHA,
  CI_RUNNER_IMAGE): 초기 JS 229,224 B, 초기 파일 28개, 가장 큰 lazy
  chunk 40,038 B(예산 122,880 B).
2026-11-12 22:33:48 +09:00

42 lines
1.7 KiB
JSON

{
"schemaVersion": 1,
"baseline": "config/scale/feature-shape-growth.json",
"ceilings": {
"contextMaxFeatures": 200,
"appMaxContexts": 20
},
"summary": "The ceilings bound the count; they are not a verified capacity. The practical limit of one app is the initial JavaScript budget, then typecheck memory. 400 features were not measured (D-18 makes it optional).",
"axes": [
{
"axis": "Typecheck of one app",
"verified": "Linear, about 115k instantiations and 37 MB of tsc memory per feature, up to 100 features",
"condition": "Reference-shaped features, tsconfig.app.json, the host recorded in the baseline",
"notVerified": "200 features (one full context) and beyond; 4,000 (20 x 200) would need on the order of 150 GB by the same slope"
},
{
"axis": "Production build",
"verified": "Completes at 100 features in seconds",
"condition": "Same",
"notVerified": "Beyond 100"
},
{
"axis": "Initial JavaScript",
"verified": "Grows by about 2.9 KB gzip and one file per feature: every installed feature's contracts and module load at boot",
"condition": "Same",
"notVerified": "The initial budget (230,400 B, config/performance/budgets.json) is exceeded after a few more reference-shaped features, far below the context ceiling"
},
{
"axis": "Lazy JavaScript",
"verified": "About 6.8 KB gzip and six files per feature, every file far below the 120 KiB lazy-chunk budget",
"condition": "Same",
"notVerified": "Download cost of many lazy files"
},
{
"axis": "Routes",
"verified": "4 per feature, composed without conflict",
"condition": "Same",
"notVerified": "Router matching cost at runtime"
}
]
}