perf(streaming): cursor publication across frame budgets

This commit is contained in:
Erik 2026-07-24 19:10:18 +02:00
parent bb16f74fd4
commit 98f1ac8934
32 changed files with 2215 additions and 823 deletions

View file

@ -330,6 +330,65 @@ public class ShadowObjectRegistryTests
entry => entry.EntityId == entityId);
}
[Fact]
public void StreamingReceipts_AreStableOrderedAndAdvanceOneStaticOwner()
{
var reg = new ShadowObjectRegistry();
reg.Register(
9u,
0x01000009u,
new Vector3(12f, 12f, 50f),
Quaternion.Identity,
1f,
OffX,
OffY,
LbId,
seedCellId: LbId | 1u,
isStatic: true);
reg.Register(
2u,
0x01000002u,
new Vector3(14f, 12f, 50f),
Quaternion.Identity,
1f,
OffX,
OffY,
LbId,
seedCellId: LbId | 1u,
isStatic: true);
reg.Register(
5u,
0x01000005u,
new Vector3(16f, 12f, 50f),
Quaternion.Identity,
1f,
OffX,
OffY,
LbId,
seedCellId: LbId | 1u,
isStatic: false);
Assert.Equal(
[2u, 9u],
reg.CaptureStaticOwnersForLandblock(LbId));
Assert.Equal(
[2u, 5u, 9u],
reg.CaptureRefloodOwnersForLandblock(LbId));
reg.DeregisterStaticOwnerForLandblock(2u, LbId);
Assert.Equal(2, reg.RetainedRegistrationCount);
Assert.DoesNotContain(
reg.GetObjectsInCell(LbId | 1u),
entry => entry.EntityId == 2u);
Assert.Contains(
reg.GetObjectsInCell(LbId | 1u),
entry => entry.EntityId == 5u);
Assert.Contains(
reg.GetObjectsInCell(LbId | 1u),
entry => entry.EntityId == 9u);
}
[Fact]
public void RefloodLandblock_RestoresAdjacentOwnedFootprintWithdrawnByUnload()
{