Skip to content

Record codegen falls back to stock creator when a component is absent #380

Closed

Description

@phraktle

The generated record reader calls the canonical constructor directly only when the input supplied every component. Otherwise _recordBuild boxes all values into an Object[] and finishes through PropertyValueBuffer and the stock creator, even when the absent components would just be null.

Envelopes commonly declare a field a given message omits. With the reproducer from #378 (cached ObjectReader, JDK 25, Apple M3), one absent String component on an otherwise identical record:

3.3.0
PayloadEnvelope (all components present) 349 ns / 1120 B
AbsentEnvelope (String err absent) 460 ns / 1536 B

Stock gives such a component the local's initial value anyway (PropertyValueBuffer._findMissing), so the direct call can be kept for it. PR: #381.

Activity

  1. added a commit that references this issue on Nov 14, 2026
  2. changed the title [-]Blackbird 3.3.0: record codegen falls back to stock creator when a component is absent[/-] [+]Record codegen falls back to stock creator when a component is absent[/+] on Nov 14, 2026
  3. added this to the 3.3.1 milestone on Nov 14, 2026
  4. added a commit that references this issue on Nov 14, 2026
    2a65c3c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.3blackbirdIssue related to Blackbird module

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions