perf(sync): reduce timeline catch-up page size
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
// Count is projected timeline items, not delta chunks. Fetch responses never return
|
// Count is projected timeline items, not delta chunks. Fetch responses never return
|
||||||
// tool lifecycle deltas; `sourceSeqRanges` maps projected items back to source seqs.
|
// tool lifecycle deltas; `sourceSeqRanges` maps projected items back to source seqs.
|
||||||
export const TIMELINE_FETCH_PAGE_SIZE = 100;
|
export const TIMELINE_FETCH_PAGE_SIZE = 40;
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ test("uses a tail fetch when a live cursor is not authoritative", async () => {
|
|||||||
membership.succeed();
|
membership.succeed();
|
||||||
|
|
||||||
const fetch = await world.nextFetch("agent-a");
|
const fetch = await world.nextFetch("agent-a");
|
||||||
expect(fetch.request).toEqual({ direction: "tail", limit: 100, projection: "projected" });
|
expect(fetch.request).toEqual({ direction: "tail", limit: 40, projection: "projected" });
|
||||||
fetch.respond({ hasNewer: false });
|
fetch.respond({ hasNewer: false });
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ test("unchanged visible-set publication does not cancel paged catch-up", async (
|
|||||||
expect(secondPage.request).toEqual({
|
expect(secondPage.request).toEqual({
|
||||||
direction: "after",
|
direction: "after",
|
||||||
cursor: { epoch: "epoch-agent-a", seq: 5 },
|
cursor: { epoch: "epoch-agent-a", seq: 5 },
|
||||||
limit: 100,
|
limit: 40,
|
||||||
projection: "projected",
|
projection: "projected",
|
||||||
});
|
});
|
||||||
world.expectNoPendingMembership();
|
world.expectNoPendingMembership();
|
||||||
@@ -371,13 +371,13 @@ test("gap recovery supersedes completed catch-up and pages through the current t
|
|||||||
{
|
{
|
||||||
direction: "after",
|
direction: "after",
|
||||||
cursor: { epoch: "epoch-agent-a", seq: 10 },
|
cursor: { epoch: "epoch-agent-a", seq: 10 },
|
||||||
limit: 100,
|
limit: 40,
|
||||||
projection: "projected",
|
projection: "projected",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
direction: "after",
|
direction: "after",
|
||||||
cursor: { epoch: "epoch-agent-a", seq: 15 },
|
cursor: { epoch: "epoch-agent-a", seq: 15 },
|
||||||
limit: 100,
|
limit: 40,
|
||||||
projection: "projected",
|
projection: "projected",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
@@ -660,7 +660,7 @@ test("legacy delivery skips subscription RPCs while retaining visibility catch-u
|
|||||||
expect(recovery.request).toEqual({
|
expect(recovery.request).toEqual({
|
||||||
direction: "after",
|
direction: "after",
|
||||||
cursor: { epoch: "epoch-agent-a", seq: 10 },
|
cursor: { epoch: "epoch-agent-a", seq: 10 },
|
||||||
limit: 100,
|
limit: 40,
|
||||||
projection: "projected",
|
projection: "projected",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user