Skip to content

Annotate the 1st part of the query pipeline for trimming #32734

@roji

Description

@roji

For NativeAOT, the 1st part of the query pipeline is not necessary and should in fact get trimmed away, since queries get precompiled out of runtime. This will also happen automatically, assuming the entry point(s) to the pipeline are enclosed in an RuntimeFeature.IsDynamicCodeSupported check.

However, when using trimming without NativeAOT, that code would still be referenced, and needs to be properly annotated in order to stop it from generating trimming warnings. Trimming without NativeAOT is actually a valuable scenario (contrary to what I thought), with "ReadyToRun + Trimmed + SingleFile" (significant file size/memory foorprint/startup time reduction, but without the runtime perf hit associated with NativeAOT, because of dynamic PGO). So we should ideally annotate the query pipeline for trimming for this case.

/cc @eerhardt

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions