4 Commits
Author SHA1 Message Date
Clifford Yapp 0c81351efd Use generic late-bound values and bounded headers
Construct SELECT, enumeration, and aggregate values from descriptors so
compact output needs no generated type classes or factories.  Preserve
enumeration elements and renamed schema items in the packed image.

Make each public schema header independently includable through the small
SchemaModule interface.  Keep runtime and model declarations internal.

AP242e4 output falls from 865 to 10 files and clean compile/link time
falls from 18.71 to 1.21 seconds.  The schema DSO falls from 3,503,352
to 2,178,296 bytes, with ELF relocations falling from 9,620 to 49.
2026-08-02 07:16:26 -04:00
Clifford Yapp 87bfb7929d Pack the complete API v2 descriptor graph
Replace late-bound descriptor procedures with validated, offset-based
schema and complex metadata images.  Use an explicit per-load context
for reentrant module construction while retaining the version 1
compatibility path.

AP242e4 generated output falls from 9,060,249 to 4,865,657 bytes and
clean compile/link time falls from 41.49 to 18.71 seconds.  The schema
DSO falls from 7,470,304 to 3,503,352 bytes and ELF relocations fall
from 33,221 to 9,620.
2026-08-02 07:04:54 -04:00
Clifford Yapp 43a95a6cf4 Pack API v2 schema module images
Replace generated SchemaModuleSlot pointer arrays with a versioned,
16-byte SchemaModuleImage.  Shared initialization helpers capture
entity, type, and attribute descriptors in stable generated-ID order
and transfer them to SchemaModule without one relocated pointer per
descriptor.

Retain the slot-based initialization entry point for existing API v2
output, and leave API v1 generation unchanged.

For AP242e4, generated output falls from 123,552 to 117,046 lines
(-5.3%) and from 9,804,680 to 9,060,249 bytes (-7.6%).  The schema
module source falls from 808,907 to 64,367 bytes (-92.0%).

The schema DSO falls from 7,728,384 to 7,470,304 bytes (-3.3%), while
ELF relocations fall from 39,719 to 33,221 (-16.4%).  Comparable clean
compile times are unchanged, and paired read/write runs improve by 0.6%.

The real file still creates and validates 10,609 instances with zero
errors and warnings.  Its 949,685-byte rewrite differs only by its
timestamp.
2026-08-02 06:15:25 -04:00
Clifford Yapp 05c6adb716 Complete compact schema modules for API v2
Add stable entity, type, and attribute IDs through SchemaModule.  Make
late-bound compatibility names opt-in, table-drive rules and complex
metadata, and emit entity metadata directly into bounded chunks.

AP242e4 late-bound output changed as follows:

* generated files: 5,719 to 905 (-84.2%)
* generated lines: 254,220 to 123,552 (-51.4%)
* generated bytes: 13,942,523 to 9,804,680 (-29.7%)
* generation wall time: 2.74s to 0.56s (-79.6%)
* compile/link wall time: 157.68s to 37.02s (-76.5%)
* compile/link peak RSS: 593,320 KiB to 199,156 KiB (-66.4%)
* shared library size: 9,956,640 to 7,716,096 bytes (-22.5%)
* read/write wall time: 0.26s to 0.25s

ELF relocations increased from 28,843 to 39,719 due to descriptor-slot
tables.  The packed schema image stage is intended to remove this cost.

The real AP242 sample created and validated 10,609 instances with zero
errors and warnings.  Rewritten output matched except for its timestamp.
2026-08-02 06:15:25 -04:00