config/scale/feature-shape-growth.json은 참조 기능 사본으로 잰 값이고, 기준 근거(feature-shape-ceilings.json의 axes)도 그 수치를 쓴다. 앞 커밋들이 측정 대상을 생성 기능으로 바꾸고 샘플을 지웠다. 샘플을 지운 트리(8c4b09b7, 수정 파일 없음)에서 node scripts/scale/measure-feature-shape-growth.ts --sizes=0,25,100 --repeats=2 --write로 다시 쟀다. 기능당 tsc instantiation 약 10.1만, tsc 메모리 약 31MB, 지연 JS 약 6.7KB와 9파일, 라우트 3개다. axes의 문장을 이 값과 firstFeatureGzipBytes에 맞췄다. 기준선 시험이 측정 대상(sourceFeature)도 본다. 위험: 시간 값은 desktop(i5-10400F, 부하 기록 포함)의 것이다. 400개 이상은 재지 않았다(D-18 선택). 검증(desktop): 같은 크기의 두 반복에서 컴파일러 수치가 같다. tests/unit/feature-shape-growth.test.ts 통과.
49 lines
2.8 KiB
JSON
49 lines
2.8 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 101k instantiations and 31 MB of tsc memory per feature, up to 100 features",
|
|
"condition": "Copies of the feature create:feature writes with --with-create --keyed (2026-11-07; reference-sample copies before), 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 125 GB by the same slope"
|
|
},
|
|
{
|
|
"axis": "Production build",
|
|
"verified": "Completes at 100 features in seconds",
|
|
"condition": "Same",
|
|
"notVerified": "Beyond 100"
|
|
},
|
|
{
|
|
"axis": "Initial JavaScript",
|
|
"verified": "15-01: only each feature's declaration (route table, messages, invalidation identities) loads at boot; its runtime half loads with its routes. initialJavascript below is the current template build, which has no feature; what the first feature adds once (firstFeatureGzipBytes: the code every feature shares joins the initial chunks); what one more feature in an existing context adds (perFeatureGzipBytes); and what a second context adds (perContextGzipBytes). tests/unit/feature-shape-growth.test.ts measures them on every unit run, bounds a feature at 1 KiB and a context at 512 B, and fails when the record no longer matches the build. The 25- and 100-copy runs are in the baseline at its source commit (before 15-01: +3,922 B per copy)",
|
|
"condition": "Same; the feature-declarations and feature-platform chunk groups in vite.config.ts",
|
|
"notVerified": "How many features fit: the initial budget (config/performance/budgets.json) minus initialJavascript.gzipBytes and firstFeatureGzipBytes, divided by perFeatureGzipBytes (plus perContextGzipBytes per new context). The platform itself takes most of the budget"
|
|
},
|
|
{
|
|
"axis": "Lazy JavaScript",
|
|
"verified": "About 6.7 KB gzip and nine 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": "3 per feature (list, detail, create), composed without conflict",
|
|
"condition": "Same",
|
|
"notVerified": "Router matching cost at runtime"
|
|
}
|
|
],
|
|
"initialJavascript": {
|
|
"gzipBytes": 194354,
|
|
"files": 17,
|
|
"firstFeatureGzipBytes": 6327,
|
|
"perFeatureGzipBytes": 539,
|
|
"perContextGzipBytes": 4
|
|
}
|
|
}
|