From dbc9a132e2bec661a8cf02762308b9bc6c7a5c97 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sat, 15 Aug 2026 21:38:11 -0400 Subject: [PATCH] perf(adminui): /deployments lists a projection, not 50 artifact blobs --- .../Components/Pages/Deployments.razor | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Deployments.razor b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Deployments.razor index 628e7c09..b9859037 100644 --- a/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Deployments.razor +++ b/src/Server/ZB.MOM.WW.OtOpcUa.AdminUI/Components/Pages/Deployments.razor @@ -66,7 +66,18 @@ @code { - private IReadOnlyList _deployments = Array.Empty(); + // Blob-free projection: the Deployment entity carries a varbinary(max) ArtifactBlob (a whole-fleet + // gzip config snapshot), which materialising the full entity would drag across the wire 50 times + // over just to render six scalar columns. + private sealed record DeploymentRow( + Guid DeploymentId, + string RevisionHash, + DeploymentStatus Status, + string CreatedBy, + DateTime CreatedAtUtc, + DateTime? SealedAtUtc); + + private IReadOnlyList _deployments = Array.Empty(); private bool _busy; private bool _lastSuccess; private string? _lastMessage; @@ -83,6 +94,13 @@ _deployments = await db.Deployments .AsNoTracking() .OrderByDescending(d => d.CreatedAtUtc) + .Select(d => new DeploymentRow( + d.DeploymentId, + d.RevisionHash, + d.Status, + d.CreatedBy, + d.CreatedAtUtc, + d.SealedAtUtc)) .Take(50) .ToListAsync();