-
Notifications
You must be signed in to change notification settings - Fork 309
Closed
Description
Problem
SDDM currently uses single-character property names (f, nt, a, etc.) as a bundle size optimization. However, analysis shows this provides minimal benefit after gzip compression:
- Uncompressed savings: 466 bytes (3.6%)
- Gzipped savings: 34 bytes (2.3%)
The short property names hurt developer experience during debugging and code exploration.
Proposal
Replace single-character names with readable names:
f→fieldsnt→namedTypea→argumentsad→argumentsDescendantit→inlineTypek→kindn→namefcs→fieldsContainingScalars
Impact
- Bundle size: +34 bytes gzipped (negligible)
- DX: Significantly improved debugging and code readability
- Changes needed:
- Update type definitions in
src/docpar/core/sddm/SchemaDrivenDataMap.ts - Update generator in
src/generator/generators/SchemaDrivenDataMap.ts - Update consumers in
src/requestPipeline/encode.ts,src/requestPipeline/decode.ts, parser context, etc.
- Update type definitions in
Analysis
Modern gzip compression largely neutralizes the benefit of short property names because it compresses repetition. After the first occurrence of a property name, subsequent occurrences compress to ~1-2 bytes regardless of length.
The optimization is a micro-optimization that provides minimal real-world benefit while hurting developer experience.
Metadata
Metadata
Assignees
Labels
No labels