perf(streaming): quiesce retired generations and budget teardown
Publish the retail blocking-for-cells edge before deferred recenter work, freeze old-world presentation/simulation/audio, and advance full-window retirement from exact metered entity and owner cursors. This removes synchronous portal teardown without allowing retained owners to remain observable.
This commit is contained in:
parent
b8f6317fe1
commit
bb16f74fd4
38 changed files with 1691 additions and 170 deletions
|
|
@ -101,6 +101,58 @@ public sealed class LandblockPresentationRetirementOwner
|
|||
() => _render.RemoveEnvironmentCells(ticket.LandblockId));
|
||||
}
|
||||
|
||||
internal LandblockRetirementOperationResult AdvanceOne(
|
||||
LandblockRetirementTicket ticket)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(ticket);
|
||||
bool staticOnly = ticket.Kind == LandblockRetirementKind.NearLayer;
|
||||
return ticket.NextIncompleteStage switch
|
||||
{
|
||||
LandblockRetirementStage.EntityLighting =>
|
||||
ticket.RunEntityStep(
|
||||
LandblockRetirementStage.EntityLighting,
|
||||
entity => !staticOnly || entity.ServerGuid == 0,
|
||||
RemoveLighting),
|
||||
LandblockRetirementStage.EntityTranslucency =>
|
||||
ticket.RunEntityStep(
|
||||
LandblockRetirementStage.EntityTranslucency,
|
||||
entity => !staticOnly || entity.ServerGuid == 0,
|
||||
RemoveTranslucency),
|
||||
LandblockRetirementStage.PluginProjection =>
|
||||
ticket.RunEntityStep(
|
||||
LandblockRetirementStage.PluginProjection,
|
||||
static entity => entity.ServerGuid == 0,
|
||||
_staticPresentation.RemovePluginProjection),
|
||||
LandblockRetirementStage.Terrain =>
|
||||
ticket.RunOnceStep(
|
||||
LandblockRetirementStage.Terrain,
|
||||
() => _render.RemoveTerrain(ticket.LandblockId)),
|
||||
LandblockRetirementStage.Physics =>
|
||||
ticket.RunOnceStep(
|
||||
LandblockRetirementStage.Physics,
|
||||
() =>
|
||||
{
|
||||
if (ticket.Kind == LandblockRetirementKind.Full)
|
||||
_physics.RemoveLandblock(ticket.LandblockId);
|
||||
else
|
||||
_physics.DemoteToTerrain(ticket.LandblockId);
|
||||
}),
|
||||
LandblockRetirementStage.CellVisibility =>
|
||||
ticket.RunOnceStep(
|
||||
LandblockRetirementStage.CellVisibility,
|
||||
() => _render.RemoveCellVisibility(ticket.LandblockId)),
|
||||
LandblockRetirementStage.BuildingRegistry =>
|
||||
ticket.RunOnceStep(
|
||||
LandblockRetirementStage.BuildingRegistry,
|
||||
() => _render.RemoveBuildingRegistry(ticket.LandblockId)),
|
||||
LandblockRetirementStage.EnvironmentCells =>
|
||||
ticket.RunOnceStep(
|
||||
LandblockRetirementStage.EnvironmentCells,
|
||||
() => _render.RemoveEnvironmentCells(ticket.LandblockId)),
|
||||
_ => LandblockRetirementOperationResult.NoWork,
|
||||
};
|
||||
}
|
||||
|
||||
private void RemoveLighting(WorldEntity entity)
|
||||
{
|
||||
if (entity.ServerGuid == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue