Blazor rendering optimization, virtualization, lazy loading, caching, and memory management
From dotnet-blazornpx claudepluginhub markus41/claude --plugin dotnet-blazorThis skill is limited to using the following tools:
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
@foreach (var item in Items)
{
<ItemCard @key="item.Id" Item="@item" />
}
private bool _shouldRender = true;
protected override bool ShouldRender() => _shouldRender;
<Virtualize Items="@_allItems" Context="item" ItemSize="50">
<ItemRow Item="@item" />
</Virtualize>
@* With item provider for server-side paging *@
<Virtualize ItemsProvider="LoadItems" Context="item">
<ItemRow Item="@item" />
</Virtualize>
@code {
private async ValueTask<ItemsProviderResult<ItemDto>> LoadItems(
ItemsProviderRequest request)
{
var result = await Service.GetPagedAsync(request.StartIndex, request.Count);
return new ItemsProviderResult<ItemDto>(result.Items, result.TotalCount);
}
}
@attribute [StreamRendering]
@if (_data is null)
{
<LoadingSpinner />
}
else
{
<DataDisplay Data="@_data" />
}
app.MapGet("/api/products", async (AppDbContext db) =>
await db.Products.AsNoTracking().ToListAsync())
.CacheOutput(policy => policy.Expire(TimeSpan.FromMinutes(5)).Tag("products"));
public sealed class CachedProductService(
IProductRepository repo,
IDistributedCache cache) : IProductService
{
public async Task<ProductDto?> GetByIdAsync(int id, CancellationToken ct)
{
var cacheKey = $"product:{id}";
var cached = await cache.GetStringAsync(cacheKey, ct);
if (cached is not null)
return JsonSerializer.Deserialize<ProductDto>(cached);
var product = await repo.GetByIdAsync(id, ct);
if (product is not null)
{
await cache.SetStringAsync(cacheKey,
JsonSerializer.Serialize(product),
new DistributedCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(10) },
ct);
}
return product;
}
}
@inject IMemoryCache Cache
@code {
protected override async Task OnInitializedAsync()
{
_categories = await Cache.GetOrCreateAsync("categories", async entry =>
{
entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromHours(1);
return await CategoryService.GetAllAsync();
});
}
}
<PublishTrimmed>true</PublishTrimmed><RunAOTCompilation>true</RunAOTCompilation>CircuitOptions.DisconnectedCircuitRetentionPeriod@rendermode InteractiveAuto for high-traffic pages to offload to WASM