perf(adminui): /deployments lists a projection, not 50 artifact blobs
This commit is contained in:
@@ -66,7 +66,18 @@
|
||||
</table>
|
||||
|
||||
@code {
|
||||
private IReadOnlyList<Deployment> _deployments = Array.Empty<Deployment>();
|
||||
// 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<DeploymentRow> _deployments = Array.Empty<DeploymentRow>();
|
||||
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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user