Skip to content

Provide ReadyToRun support for collectible assemblies #40704

@movedoa

Description

@movedoa

Currently ReadyToRun is disabled when isCollectible is true in AssemblyLoadContext.
This means that users have to choose between high memory consumption or bad startup performance if they load/unload assemblies as runtime.

In our case its even worse because we load and unload a lot of assemblies an undefined amount of time so our memory consumption would explode without assembly unloading.
This means that currently our performance suffers massively because we cant use r2r assemblies.

Imho there are obvious usecases for this and .NET should support this.

Also this restriction is not very obvious and i couldn't find any documentation that states that this doesn't work.
So the chance is high that many users aren't even aware of this limitation and loose performance.

See also #40683

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions