Skip to content

Intern strings in metadata #32719

Open
Open
@retep998

Description

@retep998

The lack of string interning causes the metadata for rlibs to massively bloat. libwinapi.rlib for example takes up 54MB, which is mostly due to strings being repeated needlessly, and exacerbated by the sheer length of many of the identifiers. Simple greps of the file indicate basically all identifiers being repeated multiple times. Even something as simple as a constant that is never referenced has its name repeated at least 3 times. Interning strings would have massive space savings.

cc @eddyb who helped in figuring this out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-metadataArea: Crate metadataC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions