Skip to content

kernel: _ClassInfo nodes own a lot of empty Sets #44568

Open
@rakudrama

Description

@rakudrama

In my large ACX app compile scenario, 51288 _ClassInfo nodes retain 68.9MB, or about 1400 bytes on average.
146730 of the 153864 directExtenders, directMixers and directImplementers Sets are empty, i.e. 95%.

This is expected because leaf classes dominate in the application - all enum classes, protobuf messages classes and ACX template classes are leaf classes.

If these Sets were created lazily just before adding, it would save ~35MB, or half of the current heap retained by the _ClassInfo nodes (genericSuperType and genericSuperTypes are created this way but are actually less sparse in the app).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions