Skip to content

Speed up type loading by storing type layout information in R2R images #45066

Open
@jkotas

Description

@jkotas

The type loading involves non-trivial time-consuming algorithms such as field or vtable layout. We may be able to speed up the type loading by storing additional pre-computed information in the R2R images.

A possible design is to save just enough data to be able to build MethodTable very quickly, and teach the rest of the runtime to deal with MethodTables that do not have EEClass, MethodDescs or FieldDescs as they would be created on demand.

The data format should be resilient to versioning changes by default, with option to more efficiency via use of version bubbles.

Compact type layouts (CTL) was a similar idea used on Windows Phone. For inspiration, more details about CTL can be found in Patent # 10,656,926.

  • Estimate potential performance improvements
  • Field layout
    • Investigate feasibility of creating FieldDescs lazily
    • Design format of the field layout data
    • Generate the field layout data in crossgen2
    • Consume the field layout data at runtime
  • Vtable layout
    • Investigate feasibility of creating MethodDescs lazily
    • Design format of the vtable layout data
    • Generate the vtable layout data in crossgen2
    • Consume the vtable layout data at runtime

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions