Skip to content

perf(grain): lazily resolve grain runtime#10117

Draft
ReubenBond wants to merge 1 commit into
dotnet:mainfrom
ReubenBond:rebond/lazy-grain-runtime-access
Draft

perf(grain): lazily resolve grain runtime#10117
ReubenBond wants to merge 1 commit into
dotnet:mainfrom
ReubenBond:rebond/lazy-grain-runtime-access

Conversation

@ReubenBond

@ReubenBond ReubenBond commented May 17, 2026

Copy link
Copy Markdown
Member

Avoid storing an IGrainRuntime reference on every Grain instance until it is needed.

The runtime is resolved from the shared grain type context when available, preserving the existing direct-construction behavior for tests and non-runtime-created grains.

Validation: dotnet build src\Orleans.Runtime\Orleans.Runtime.csproj --nologo --verbosity:minimal

Microsoft Reviewers: Open in CodeFlow

Avoid storing an IGrainRuntime reference on every Grain instance until it is needed, and resolve the shared runtime from GrainTypeSharedContext without adding an activation component.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond changed the title Lazily resolve grain runtime perf(grain): lazily resolve grain runtime May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant